/* ==========================================================================
   AfterNote - Support & Help Center Stylesheet (support.css)
   Ultra-modern glassmorphism design matching /price and AfterNote theme
   ========================================================================== */

/* Общие контейнеры поддержки */
.support-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 80px;
    position: relative;
    z-index: 1;
}

/* Hero-секция */
.support-hero {
    text-align: center;
    padding: 48px 0 36px;
    max-width: 820px;
    margin: 0 auto;
}

.support-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
}

.support-title {
    font-size: clamp(32px, 4.5vw, 46px);
    font-weight: 800;
    line-height: 1.18;
    color: #ffffff;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.support-title .gradient-text {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.support-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto 28px;
}

/* Быстрые ссылки под Hero */
.support-quick-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.quick-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(25, 36, 58, 0.7);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    backdrop-filter: blur(12px);
}

.quick-nav-btn:hover {
    background: rgba(38, 55, 88, 0.85);
    border-color: var(--border-accent);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.4);
}

.quick-nav-btn.primary {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 6px 20px -4px var(--primary-glow);
}

.quick-nav-btn.primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
    box-shadow: 0 8px 24px -2px var(--primary-glow);
}

/* ==========================================================================
   СЕКЦИЯ FAQ (Часто задаваемые вопросы)
   ========================================================================== */
.support-section {
    margin-bottom: 56px;
}

.section-header-box {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    flex-direction: column;
}

.section-header-left h2 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.section-header-left p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Поиск по FAQ */
.faq-search-wrap {
    position: relative;
    min-width: 280px;
    max-width: 380px;
    width: 100%;
}

.faq-search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all var(--transition-fast);
}

.faq-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(15, 23, 42, 0.98);
}

.faq-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 14px;
}

/* Список вопросов FAQ (аккордеон) */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-fast);
    backdrop-filter: blur(12px);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--bg-card-hover);
}

.faq-item.is-open {
    border-color: var(--border-accent);
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
}

.faq-question {
    width: 100%;
    padding: 18px 22px;
    background: none;
    border: none;
    text-align: left;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: inherit;
    user-select: none;
    transition: color var(--transition-fast);
}

.faq-item.is-open .faq-question {
    color: var(--primary);
}

.faq-chevron {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-muted);
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.faq-item.is-open .faq-chevron {
    transform: rotate(180deg);
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.faq-answer {
    padding: 0 22px 20px;
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.65;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    display: none !important;
}

.faq-item.is-open .faq-answer {
    display: block !important;
}

.faq-answer a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.faq-answer a:hover {
    color: #ffffff;
}

/* ==========================================================================
   СЕКЦИЯ ОБРАТНОЙ СВЯЗИ / ФОРМА ТИКЕТА
   ========================================================================== */
.support-form-card {
    width: 860px;
    background: rgba(18, 27, 46, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    margin: 0 auto;
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    position: relative;
}

.support-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), rgba(139, 92, 246, 0.4), transparent);
}

.form-grid-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-label .req {
    color: var(--accent-rose);
    margin-left: 4px;
}

.form-hint {
    font-size: 12px;
    font-weight: normal;
    color: var(--text-muted);
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(11, 17, 30, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 14.5px;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(11, 17, 30, 0.98);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
    padding-right: 38px;
}

.form-select option {
    background: #0f172a;
    color: #ffffff;
}

/* ==========================================================================
   ВИЗУАЛЬНЫЙ РЕДАКТОР ФОРМАТИРОВАНИЯ (QUILL DARK THEME)
   ========================================================================== */
.support-quill-wrapper {
    background: rgba(11, 17, 30, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.support-quill-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.support-quill-wrapper .ql-toolbar.ql-snow {
    background: rgba(22, 32, 54, 0.75);
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.support-quill-wrapper .ql-snow .ql-stroke {
    stroke: #94a3b8 !important;
}

.support-quill-wrapper .ql-snow .ql-fill {
    fill: #94a3b8 !important;
}

.support-quill-wrapper .ql-snow .ql-picker {
    color: #94a3b8 !important;
}

.support-quill-wrapper .ql-snow.ql-toolbar button {
    width: 32px;
    height: 30px;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.support-quill-wrapper .ql-snow.ql-toolbar button:hover,
.support-quill-wrapper .ql-snow.ql-toolbar button:focus,
.support-quill-wrapper .ql-snow.ql-toolbar button.ql-active {
    background: rgba(56, 189, 248, 0.15) !important;
}

.support-quill-wrapper .ql-snow.ql-toolbar button:hover .ql-stroke,
.support-quill-wrapper .ql-snow.ql-toolbar button:focus .ql-stroke,
.support-quill-wrapper .ql-snow.ql-toolbar button.ql-active .ql-stroke {
    stroke: #38bdf8 !important;
}

.support-quill-wrapper .ql-snow.ql-toolbar button:hover .ql-fill,
.support-quill-wrapper .ql-snow.ql-toolbar button:focus .ql-fill,
.support-quill-wrapper .ql-snow.ql-toolbar button.ql-active .ql-fill {
    fill: #38bdf8 !important;
}

.support-quill-wrapper .ql-container.ql-snow {
    border: none !important;
    font-family: inherit;
    font-size: 14.5px;
    color: #ffffff;
    min-height: 190px;
    cursor: text;
}

.support-quill-wrapper .ql-editor {
    min-height: 190px;
    padding: 16px;
    line-height: 1.6;
    color: #ffffff;
    font-family: inherit;
    font-size: 14.5px;
}

.support-quill-wrapper .ql-editor.ql-blank::before {
    color: #64748b !important;
    font-style: normal;
    left: 16px;
    right: 16px;
}

.support-quill-wrapper .ql-editor blockquote {
    border-left: 3px solid var(--primary) !important;
    background: rgba(56, 189, 248, 0.06);
    padding: 6px 14px !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #cbd5e1;
}

.support-quill-wrapper .ql-editor pre.ql-syntax,
.support-quill-wrapper .ql-editor .ql-code-block-container {
    background: #090e17 !important;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: #38bdf8 !important;
    padding: 12px !important;
}

.support-quill-wrapper .ql-editor code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    color: #38bdf8;
}

.editor-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   ЗАГРУЗКА ИЗОБРАЖЕНИЙ (ФОТО) С ОГРАНИЧЕНИЯМИ
   ========================================================================== */
.photo-upload-section {
    margin-bottom: 24px;
}

.photo-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    background: rgba(11, 17, 30, 0.5);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.photo-dropzone:hover, .photo-dropzone.drag-over {
    border-color: var(--primary);
    background: rgba(56, 189, 248, 0.05);
}

.dropzone-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: inline-block;
}

.dropzone-text {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.dropzone-subtext {
    font-size: 12px;
    color: var(--text-muted);
}

.dropzone-file-input {
    display: none;
}

/* Список прикреплённых файлов (Превью) */
.attached-photos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.attached-photo-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-subtle);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.attached-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.attached-photo-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.attached-photo-remove:hover {
    background: #ef4444;
    transform: scale(1.1);
}

.attached-photo-size {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #94a3b8;
    font-size: 10.5px;
    padding: 2px 4px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Защита от спама: Honeypot поле (скрыто от пользователей) */
.website-url-honeypot {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    pointer-events: none;
}

/* Кнопка отправки */
.support-submit-btn {
    width: 100%;
    padding: 15px 28px;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px -4px rgba(2, 132, 199, 0.45);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.support-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 50%, #4338ca 100%);
    box-shadow: 0 10px 30px -2px rgba(2, 132, 199, 0.6);
    transform: translateY(-2px);
}

.support-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.support-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Карточка успешной отправки */
.support-success-card {
    text-align: center;
    padding: 32px 20px;
}

.success-badge-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.25);
}

.success-ticket-num-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 16px 0 24px;
}

.copy-ticket-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background var(--transition-fast);
}

.copy-ticket-btn:hover {
    background: var(--primary);
}

/* Оповещения об ошибках */
.support-alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.support-alert.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

/* Адаптивность */
@media (max-width: 767px) {
    .support-container {
        padding: 0 0px 50px;
    }

    .support-hero {
        padding: 28px 0 20px;
    }

    .support-title {
        font-size: 26px;
        line-height: 1.22;
        margin-bottom: 10px;
    }

    .support-subtitle {
        font-size: 14px;
        line-height: 1.4
        margin-bottom: 20px;
        padding: 0 4px;
    }

    .support-quick-nav {
        gap: 8px;
        margin-bottom: 28px;
    }

    .quick-nav-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .support-form-card {
        padding: 20px 14px;
        border-radius: var(--radius-md);
    }

    .form-grid-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .support-input,
    .support-select {
        font-size: 16px; /* Защита от масштабирования на мобильных Safari */
    }

    .faq-question {
        padding: 0px 9px 0px 5px;
        font-size: 13px;
    }

    /* Quill-редактор на мобильных: горизонтальный свайп тулбара */
    .support-quill-wrapper .ql-snow.ql-toolbar {
        display: flex;
        flex-wrap: wrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 8px 5px;
        gap: 2px;
    }

    .ql-toolbar.ql-snow .ql-formats {
        margin-right: 5px;
    }

    .support-quill-wrapper .ql-snow.ql-toolbar::-webkit-scrollbar {
        display: none;
    }

    .support-quill-wrapper .ql-snow.ql-toolbar button {
        flex: 0 0 auto;
        width: 28px;
        height: 24px;
    }

    .support-quill-wrapper .ql-container.ql-snow,
    .support-quill-wrapper .ql-editor {
        min-height: 150px;
        font-size: 14px;
    }

    .support-quill-wrapper .ql-editor {
        line-height: 1.5;
    }

    .editor-footer-bar {
        padding: 6px 10px;
        font-size: 11px;
        flex-direction: column;
        align-items: flex-start;
    }

    /* Дропзона и фото */
    .photo-upload-section {
        margin-top: 30px;
    }

    .photo-dropzone {
        padding: 16px 12px;
    }

    .dropzone-icon {
        font-size: 26px;
        margin-bottom: 4px;
    }

    .dropzone-text {
        font-size: 13px;
    }

    .attached-photos-list {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }

    /* FAQ и поиск */
    .faq-search-wrap {
        max-width: 100%;
    }

    .section-header-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Экран успешной отправки тикета */
    .ticket-success-box {
        padding: 24px 16px;
    }

    .ticket-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .btn-submit-ticket {
        padding: 13px 18px;
        font-size: 14px;
    }

    .support-submit-btn {
        padding: 15px;
    }

    .support-submit-ssl {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .support-pill {
        font-size: 11.5px;
        padding: 4px 12px;
        margin-bottom: 14px;
    }

    .support-title {
        font-size: 22px;
    }

    .quick-nav-btn {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
        text-align: center;
        font-size: 12.5px;
    }

    .faq-chevron {
        font-size: 10px;
        line-height: 1;
    }

    .faq-answer {
        padding: 24px 9px 14px;
        font-size: 14px;
        line-height: 1.4;
    }

    .section-header-left h2,
    .section-header-left h2 span {
        font-size: 19px;
    }

    .section-header-left p {
        font-size: 13px;
        line-height: 1.4;
    }

    .form-label {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group {
        gap: 4px;
        margin-bottom: 12px;
    }

    .form-grid-row {
        gap: 20px;
    }
}

