/**
 * Help & Support Modal Styles
 *
 * Modern modal design with blur effects, animations, and responsive layout.
 */

/* ========================================
   MODAL OVERLAY & CONTAINER
   ======================================== */

.help-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.help-modal-overlay.show {
    display: flex !important;
}

.help-modal-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   MODAL HEADER
   ======================================== */

.help-modal-header {
    padding: 20px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.help-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-secondary, #1f2937);
    margin: 0 0 6px 0;
}

.help-modal-subtitle {
    font-size: 13px;
    color: var(--color-text-light, #6b7280);
    margin: 0;
}

/* Close button */
.help-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* ========================================
   MODAL BODY
   ======================================== */

.help-modal-body {
    padding: 20px 24px 24px;
}

/* ========================================
   HELP OPTIONS GRID
   ======================================== */

.help-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.help-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 16px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 90px;
}

.help-type-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.help-type-btn:hover {
    border-color: var(--color-primary, #7c3aed);
    background: var(--color-primary-lighter, #f3f0ff);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.15);
}

.help-type-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.help-type-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-secondary, #1f2937);
    margin-bottom: 4px;
    display: block;
}

.help-type-desc {
    font-size: 13px;
    color: var(--color-text-light, #6b7280);
    display: block;
}

/* ========================================
   CONTACT FORM
   ======================================== */

.help-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 28px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text, #1f2937);
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-back-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.help-contact-form {
    display: flex;
    flex-direction: column;
    gap: 5px !important;
}

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

.help-form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-secondary, #1f2937);
}

.help-form-input,
.help-form-textarea {
    padding: 10px 12px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 7px !important;
    font-size: 14px;
    color: var(--color-text, #1f2937) !important;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-bottom: 0px !important;
}

.help-form-input:focus,
.help-form-textarea:focus {
    outline: none;
    border-color: var(--color-primary, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.help-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.help-form-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
}

.help-form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
}

.help-submit-btn {
    padding: 16px 28px;
    background: var(--color-primary, #7c3aed);
    border: none;
    border-radius: 12px !important;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-submit-btn:hover:not(:disabled) {
    background: var(--color-primary-hover, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

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

/* ========================================
   SUCCESS VIEW
   ======================================== */

.help-success-view {
    padding: 32px 24px;
}

.help-success-content {
    text-align: center;
}

.help-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-primary, #7c3aed);
    color: #ffffff;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.help-success-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--color-secondary, #1f2937);
    margin: 0 0 10px 0;
}

.help-success-text {
    font-size: 13px;
    color: var(--color-text-light, #6b7280);
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.help-close-success-btn {
    padding: 10px 28px;
    background: var(--color-primary, #7c3aed);
    border: none;
    border-radius: 7px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-close-success-btn:hover {
    background: var(--color-primary-hover, #6d28d9);
}

/* ========================================
   BODY SCROLL LOCK
   ======================================== */

body.help-modal-open {
    overflow: hidden;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 640px) {
    .help-modal-overlay {
        padding: 10px;
        /* Tighter padding around modal */
    }

    .help-modal-container {
        border-radius: 12px;
        /* Preserve border radius */
        max-height: 90vh;
        /* Not full screen anymore */
        height: auto;
        margin-top: auto;
        margin-bottom: auto;
    }

    .help-modal-header {
        padding: 16px 20px 12px;
    }

    .help-modal-title {
        font-size: 18px;
    }

    .help-modal-subtitle {
        font-size: 12px;
    }

    .help-modal-body {
        padding: 12px 20px 20px;
    }

    .help-options-grid {
        gap: 10px;
    }

    .help-type-btn {
        flex-direction: row;
        /* Horizontal layout */
        align-items: center;
        justify-content: flex-start;
        min-height: 60px;
        /* Much shorter */
        padding: 12px 16px;
        gap: 15px;
    }

    .help-type-icon {
        font-size: 24px;
        /* Slightly smaller icon */
        margin-bottom: 0;
        width: 40px;
        text-align: center;
    }

    .help-type-btn .help-type-content {
        text-align: left;
        display: flex;
        flex-direction: column;
    }

    .help-type-label {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .help-type-desc {
        font-size: 12px;
    }

    .help-success-view {
        padding: 24px 20px;
    }

    .help-success-icon {
        width: 56px;
        height: 56px;
        font-size: 32px;
        margin-bottom: 16px;
    }

    .help-success-title {
        font-size: 18px;
    }

    .help-back-btn {
        margin-bottom: 16px;
        padding: 6px 12px;
        font-size: 13px;
    }

    .help-form-group label {
        font-size: 12px;
    }

    .help-form-input,
    .help-form-textarea {
        padding: 8px 10px;
        font-size: 14px;
    }

    .help-form-textarea {
        min-height: 70px;
    }
}

/* ========================================
   SIDEBAR HELP LINK (COMPACT DESIGN)
   ======================================== */

.help-support-link {
    margin-top: auto;
    padding: 12px 0px;
    border-top: 1px solid #e5e7eb;
}

.help-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1.5px solid var(--color-primary, #7c3aed);
    border-radius: 8px;
    color: var(--color-primary, #7c3aed);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.help-link:hover {
    background: var(--color-primary-lighter, #f3f0ff);
    border-color: var(--color-primary-hover, #6d28d9);
    color: var(--color-primary-hover, #6d28d9);
}

.help-icon {
    width: 20px;
    height: 20px;
    background: var(--color-primary, #7c3aed);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.help-text {
    flex: 1;
}