/* ============================
   INFO PAGE — SHARED STYLES
============================ */

/* Info Button (floating, bottom-right) */
.info-btn-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 998;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.info-btn-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(52, 152, 219, 0.5);
}

.info-btn-float:active {
    transform: scale(0.95);
}

/* ============================
   MODAL OVERLAY
============================ */
.info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.info-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================
   MODAL CONTAINER
============================ */
.info-modal {
    background: #ffffff;
    border-radius: 24px;
    width: 94%;
    max-width: 620px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.info-overlay.active .info-modal {
    transform: translateY(0) scale(1);
}

/* Scrollbar custom */
.info-modal::-webkit-scrollbar {
    width: 6px;
}
.info-modal::-webkit-scrollbar-track {
    background: transparent;
}
.info-modal::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* ============================
   HEADER
============================ */
.info-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #3498db 0%, #2471a3 100%);
    color: white;
    padding: 28px 30px 24px;
    border-radius: 24px 24px 0 0;
    z-index: 2;
}

.info-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-header p {
    font-size: 14px;
    opacity: 0.85;
    margin: 0;
}

.info-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.info-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

/* Variant for paninaro (orange header) */
.info-header.paninaro {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
}

/* ============================
   BODY CONTENT
============================ */
.info-body {
    padding: 28px 30px 30px;
}

/* Section blocks */
.info-section {
    margin-bottom: 28px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-section p,
.info-section li {
    font-size: 14px;
    color: #555;
    line-height: 1.65;
}

/* Steps list */
.info-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.info-steps li {
    position: relative;
    padding: 12px 14px 12px 52px;
    margin-bottom: 8px;
    background: #f8f9fb;
    border-radius: 14px;
    border: 1px solid #eef1f5;
    transition: background 0.2s ease, transform 0.2s ease;
}

.info-steps li:hover {
    background: #eef4fb;
    transform: translateX(4px);
}

.info-steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Paninaro steps use orange */
.info-steps.paninaro li::before {
    background: #f39c12;
}

/* ============================
   TIME SLOTS (No counter)
============================ */
.info-times {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-times li {
    position: relative;
    padding: 14px 18px;
    margin-bottom: 10px;
    background: #f8f9fb;
    border-radius: 14px;
    border: 1px solid #eef1f5;
    border-left: 4px solid #3498db;
    transition: background 0.2s ease, transform 0.2s ease;
}

.info-times li:hover {
    background: #eef4fb;
    transform: translateX(4px);
}

.info-times li.downtime {
    background: #fff5f5;
    border-left-color: #e74c3c;
}

/* Highlight text */
.info-highlight {
    display: inline-block;
    background: #eaf4fe;
    color: #2471a3;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.info-highlight.orange {
    background: #fff8e1;
    color: #b7791f;
}

/* ============================
   FAQ ACCORDION
============================ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    border-color: #c8d8e8;
}

.faq-item.open {
    border-color: #3498db;
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.1);
}

.faq-item.paninaro.open {
    border-color: #f39c12;
    box-shadow: 0 4px 16px rgba(243, 156, 18, 0.1);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: #f8f9fb;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #1A1A1A;
    text-align: left;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: #eef4fb;
}

.faq-question .faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.faq-item.paninaro .faq-question .faq-icon {
    background: #f39c12;
}

.faq-item.open .faq-question .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), padding 0.35s ease;
    padding: 0 16px;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 16px 16px;
}

.faq-answer p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* ============================
   DIVIDER
============================ */
.info-divider {
    border: none;
    height: 1px;
    background: #e8ecf1;
    margin: 24px 0;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 600px) {
    .info-btn-float {
        width: 44px;
        height: 44px;
        font-size: 20px;
        bottom: 90px;
        right: 16px;
    }

    .info-modal {
        width: 96%;
        max-height: 90vh;
        border-radius: 20px;
    }

    .info-header {
        padding: 22px 20px 18px;
        border-radius: 20px 20px 0 0;
    }

    .info-header h2 {
        font-size: 20px;
    }

    .info-body {
        padding: 20px;
    }

    .info-steps li {
        padding-left: 48px;
        font-size: 13px;
    }
}

/* Fix for login page: position info button above paninaro status */
@media (max-width: 700px) {
    body.has-paninaro-status .info-btn-float {
        bottom: 130px;
    }
}

/* Fix per evitare che il bottone sia coperto dalla bottom-nav su tablet */
@media (min-width: 601px) and (max-width: 1024px) {
    .info-btn-float {
        bottom: 90px;
    }
}

/* ============================
   HELP BUTTON (floating, above Info)
============================ */
.help-btn-float {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 998;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: white;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.help-btn-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(39, 174, 96, 0.55);
}

.help-btn-float:active {
    transform: scale(0.95);
}

/* ============================
   HELP MODAL
============================ */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.help-overlay.active {
    opacity: 1;
    visibility: visible;
}

.help-modal {
    background: #ffffff;
    border-radius: 24px;
    width: 94%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.help-overlay.active .help-modal {
    transform: translateY(0) scale(1);
}

.help-modal::-webkit-scrollbar { width: 6px; }
.help-modal::-webkit-scrollbar-track { background: transparent; }
.help-modal::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

/* Header */
.help-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: white;
    padding: 28px 30px 24px;
    border-radius: 24px 24px 0 0;
    z-index: 2;
}

.help-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
}

.help-header p {
    font-size: 13px;
    opacity: 0.85;
    margin: 0;
}

.help-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.help-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

/* Body / Form */
.help-body {
    padding: 26px 30px 30px;
}

.help-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.help-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.help-field label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.help-field input,
.help-field select,
.help-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e0e6ed;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    background: #f8f9fb;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.help-field input:focus,
.help-field select:focus,
.help-field textarea:focus {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.12);
    background: #fff;
}

.help-field textarea {
    resize: vertical;
    min-height: 120px;
}

.help-char-count {
    font-size: 11px;
    color: #999;
    text-align: right;
}

.help-char-count.warn {
    color: #e67e22;
}

.help-submit-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.2s ease, transform 0.15s ease;
    margin-top: 4px;
}

.help-submit-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.help-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Feedback banner */
.help-feedback {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.help-feedback.success {
    background: #e8f8ef;
    color: #1e8449;
    border: 1px solid #a9dfbf;
    display: block;
}

.help-feedback.error {
    background: #fdf3f3;
    color: #c0392b;
    border: 1px solid #f5b7b1;
    display: block;
}

/* ============================
   RESPONSIVE HELP
============================ */
@media (max-width: 600px) {
    .help-btn-float {
        width: 44px;
        height: 44px;
        font-size: 18px;
        bottom: 144px;
        right: 16px;
    }

    .help-header {
        padding: 22px 20px 18px;
        border-radius: 20px 20px 0 0;
    }

    .help-header h2 { font-size: 18px; }

    .help-body { padding: 20px; }

    .help-modal {
        width: 96%;
        max-height: 92vh;
        border-radius: 20px;
    }
}

/* Fix per login page (has-paninaro-status) */
@media (max-width: 700px) {
    body.has-paninaro-status .help-btn-float {
        bottom: 185px;
    }
}

/* Fix per bottom-nav su tablet */
@media (min-width: 601px) and (max-width: 1024px) {
    .help-btn-float {
        bottom: 148px;
    }
}
/* =========================
   DARK MODE SUPPORT (INFO/HELP)
========================= */
[data-theme="dark"] .info-modal,
[data-theme="dark"] .help-modal {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .info-section-title,
[data-theme="dark"] .help-field label {
    color: var(--text-primary);
}

[data-theme="dark"] .info-section p,
[data-theme="dark"] .info-section li,
[data-theme="dark"] .faq-answer p,
[data-theme="dark"] .help-header p,
[data-theme="dark"] .info-header p {
    color: var(--text-secondary);
}

[data-theme="dark"] .info-steps li,
[data-theme="dark"] .info-times li,
[data-theme="dark"] .faq-question {
    background: var(--bg-input);
    border-color: var(--border-light);
    color: var(--text-primary);
}

[data-theme="dark"] .info-steps li:hover,
[data-theme="dark"] .info-times li:hover,
[data-theme="dark"] .faq-question:hover {
    background: var(--border-light);
}

[data-theme="dark"] .faq-item {
    border-color: var(--border-light);
}

[data-theme="dark"] .info-divider {
    background: var(--border-light);
}

[data-theme="dark"] .help-field input,
[data-theme="dark"] .help-field select,
[data-theme="dark"] .help-field textarea {
    background: var(--bg-input);
    border-color: var(--border-light);
    color: var(--text-primary);
}

[data-theme="dark"] .help-field input:focus,
[data-theme="dark"] .help-field select:focus,
[data-theme="dark"] .help-field textarea:focus {
    background: var(--bg-card);
    border-color: var(--accent);
}

[data-theme="dark"] .info-modal::-webkit-scrollbar-thumb,
[data-theme="dark"] .help-modal::-webkit-scrollbar-thumb {
    background: #444;
}
