/* ========================================
   Technical Support Page Styles
   Filename: /assets/css/support.min.css
   ======================================== */
.atf-site-header.atf-style1{
    background: rgba(0, 7, 14, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(31, 114, 195, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form Container */
.atf-support-area {
    background: var(--thm-f6);
    position: relative;
}

.atf-support-form-wrapper {
    background: var(--thm-white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(20, 41, 108, 0.08);
    padding: 50px;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.atf-support-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--thm-line);
}

/* Tips Container */
.support-tips-container {
    margin-bottom: 50px;
}

.support-tip-card {
    background: var(--thm-white);
    border-radius: 12px;
    padding: 30px;
    height: 100%;
    display: flex;
    align-items: flex-start;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(58, 151, 255, 0.1);
}

.support-tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(58, 151, 255, 0.15);
    border-color: var(--thm-color);
}

.tip-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--thm-line);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.tip-icon i {
    font-size: 24px;
    color: var(--thm-white);
}

.tip-content h4 {
    color: var(--thm-black);
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.tip-content p {
    color: var(--thm-p);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.tip-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tip-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--thm-p);
    font-size: 14px;
}

.tip-list li:before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--thm-color);
    font-size: 12px;
}

/* Form Sections */
.form-section {
    margin-bottom: 45px;
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    color: var(--thm-black);
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    position: relative;
}

.section-number {
    width: 36px;
    height: 36px;
    background: var(--thm-line);
    color: var(--thm-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 16px;
    font-weight: 700;
}

.subsection-title {
    color: var(--thm-black);
    font-size: 18px;
    margin: 25px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--thm-f6);
    font-weight: 600;
}

/* Form Controls */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    color: var(--thm-black);
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 15px;
    display: block;
}

.form-group label .required {
    color: #dc3545;
    margin-left: 3px;
    font-weight: 700;
}

.form-control {
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--thm-white);
    color: var(--thm-p);
    font-family: var(--thm-font);
}

.form-control:hover {
    border-color: rgba(58, 151, 255, 0.3);
}

.form-control:focus {
    border-color: var(--thm-color);
    box-shadow: 0 0 0 4px rgba(58, 151, 255, 0.1);
    outline: none;
}

.form-control:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A97FF' stroke-width='2' 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 16px center;
    background-size: 20px;
    padding-right: 48px;
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

.form-text {
    font-size: 13px;
    color: var(--thm-gray);
    margin-top: 6px;
}

/* StellaVita Section */
.stella-vita-section {
    background: var(--thm-f6);
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* File Upload Area */
.custom-file-upload {
    position: relative;
    margin-bottom: 20px;
}

.custom-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 180px;
    cursor: pointer;
    z-index: 2;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    border: 3px dashed #d8dde6;
    border-radius: 12px;
    background: linear-gradient(135deg, #fafbfc 0%, var(--thm-f6) 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-upload-label::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(58, 151, 255, 0.05);
    border-radius: 50%;
    transition: all 0.5s ease;
}

.file-upload-label:hover::before {
    width: 100%;
    height: 100%;
}

.file-upload-label i {
    font-size: 56px;
    color: var(--thm-color);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.upload-text {
    color: var(--thm-black);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.upload-hint {
    color: var(--thm-gray);
    font-size: 13px;
}

.custom-file-upload input[type="file"]:hover + .file-upload-label,
.custom-file-upload input[type="file"]:focus + .file-upload-label,
.custom-file-upload.dragover .file-upload-label {
    border-color: var(--thm-color);
    background: linear-gradient(135deg, var(--thm-f6) 0%, rgba(58, 151, 255, 0.05) 100%);
}

.custom-file-upload.dragover .file-upload-label i {
    transform: scale(1.1);
}

/* File List */
.file-list {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--thm-f6);
    border-radius: 8px;
    margin-bottom: 10px;
    animation: slideInUp 0.3s ease;
    border: 1px solid rgba(58, 151, 255, 0.1);
}

.file-item:hover {
    background: linear-gradient(135deg, var(--thm-f6) 0%, rgba(58, 151, 255, 0.05) 100%);
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--thm-white);
    border-radius: 8px;
    margin-right: 15px;
}

.file-icon i {
    font-size: 20px;
    color: var(--thm-color);
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--thm-black);
    font-size: 14px;
    margin-bottom: 4px;
    word-break: break-word;
}

.file-size {
    color: var(--thm-gray);
    font-size: 12px;
}

.remove-file {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.remove-file:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

/* File Size Info */
.file-size-info {
    margin-top: 15px;
}

.size-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.size-bar-fill {
    height: 100%;
    background: var(--thm-line);
    border-radius: 3px;
    width: 0;
    transition: width 0.3s ease;
}

.size-text {
    font-size: 13px;
    color: var(--thm-gray);
    text-align: right;
}

.size-text span {
    font-weight: 600;
    color: var(--thm-black);
}

/* Submit Section */
.submit-section {
    background: linear-gradient(135deg, #fafbfc 0%, var(--thm-f6) 100%);
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-input:checked {
    background-color: var(--thm-color);
    border-color: var(--thm-color);
}

.form-check-label {
    cursor: pointer;
    font-size: 14px;
    color: var(--thm-p);
    max-width: 500px;
}

.form-check-label a {
    color: var(--thm-color);
    text-decoration: underline;
}

.form-check-label a:hover {
    text-decoration: none;
}

/* Submit Button */
.atf-themes-btn.btn-lg {
    min-height: var(--v2-button-height, 44px);
    padding: 0 40px;
    font-size: 18px;
    font-weight: 600;
    /* 支持页大按钮改为新版主按钮语义，避免继续使用旧渐变。 */
    border-radius: var(--v2-radius-button-pill, 22px);
    background: var(--v2-primary-500);
    border: none;
    color: var(--v2-text-inverse);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.atf-themes-btn.btn-lg:before {
    /* 新版主按钮移除旧版扩散扫光动画。 */
    display: none;
    content: none;
}

.atf-themes-btn.btn-lg:hover {
    transform: translateY(-2px);
    background: var(--v2-primary-400);
    box-shadow: var(--v2-shadow-card-hover);
}

.atf-themes-btn.btn-lg:hover:before {
    display: none;
}

.atf-themes-btn.btn-lg:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.atf-themes-btn.btn-lg i {
    margin-right: 10px;
}

/* Alert Messages */
.alert {
    border-radius: 10px;
    padding: 16px 20px;
    animation: fadeIn 0.5s ease;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert i {
    margin-right: 10px;
    font-size: 20px;
}

.alert strong {
    font-weight: 600;
}

/* Validation Feedback */
.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Character Counter */
#subjectCount, #descriptionCount {
    font-weight: 600;
    color: var(--thm-black);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--thm-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .atf-support-form-wrapper {
        padding: 30px 20px;
    }

    .section-title {
        font-size: 20px;
    }

    .section-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

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

    .form-control {
        font-size: 14px;
        padding: 10px 14px;
    }

    select.form-control {
        background-position: right 12px center;
        padding-right: 40px;
    }

    .atf-themes-btn.btn-lg {
        padding: 14px 32px;
        font-size: 16px;
        width: 100%;
    }

    .file-upload-label {
        height: 150px;
    }

    .file-upload-label i {
        font-size: 42px;
    }

    .upload-text {
        font-size: 14px;
    }

    .upload-hint {
        font-size: 12px;
    }

    .stella-vita-section {
        padding: 20px;
    }

    .tip-icon {
        width: 50px;
        height: 50px;
        margin-right: 15px;
    }

    .tip-icon i {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .atf-support-form-wrapper {
        padding: 25px 15px;
        border-radius: 12px;
    }

    .form-section {
        margin-bottom: 35px;
        padding-bottom: 25px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .support-tip-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .tip-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }

    .file-info {
        width: 100%;
        margin-bottom: 10px;
    }

    .remove-file {
        align-self: flex-end;
    }

    .submit-section {
        padding: 25px 20px;
    }

    .form-check-label {
        font-size: 13px;
    }
}

/* ============================================================
   V2 Support Hub Overrides
   说明：
   - 技术支持页统一 tab、表单容器和顶部说明区的卡片语言。
   - 使用 V2 token 压平旧渐变和旧阴影强度。
   ============================================================ */

.atf-contact-area {
    background: linear-gradient(180deg, var(--v2-bg-functional) 0%, var(--v2-bg-primary) 100%);
}

.nav-tabs,
.atf-contact-form {
    background: var(--v2-bg-primary);
    border: 1px solid var(--v2-bg-divider);
    border-radius: var(--v2-radius-lg);
    box-shadow: var(--v2-shadow-card);
}

.nav-tabs .nav-link {
    color: var(--v2-text-secondary);
    border-radius: var(--v2-radius-sm);
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link.active {
    background: var(--v2-primary-500);
    color: var(--v2-text-inverse);
    box-shadow: none;
    transform: none;
}

.custom-select,
.select-dropdown {
    background: var(--v2-bg-primary);
    border-color: var(--v2-bg-divider);
    color: var(--v2-text-body);
}

.custom-select:hover,
.custom-select.active {
    border-color: var(--v2-primary-500);
    box-shadow: 0 0 0 4px rgba(var(--v2-primary-500-rgb), 0.12);
}

/* ============================================================
   V2 Supports Final Alignment
   说明：
   - 多标签支持页还残留旧 tab 间距、旧输入框和旧结果列表的边角。
   - 这里补最终覆盖，让 tab、结果块和上传/提交区都落回 V2。
   ============================================================ */

.atf-contact-area,
.atf-contact-form,
.support-result-card,
.support-history-card,
.support-empty-state {
    background: var(--v2-bg-primary);
    border: 1px solid var(--v2-bg-divider);
    border-radius: var(--v2-radius-lg);
    box-shadow: var(--v2-shadow-card);
}

.nav-tabs {
    padding: 8px;
    gap: 8px;
}

.nav-tabs .nav-link {
    min-height: 42px;
    border-radius: var(--v2-radius-md);
}

.form-control,
.custom-select,
.select-dropdown,
.file-upload-label,
.upload-placeholder {
    background: var(--v2-bg-primary);
    border: 1px solid var(--v2-bg-divider);
    border-radius: var(--v2-radius-md);
    color: var(--v2-text-body);
}

.form-control:focus,
.custom-select:focus,
.select-dropdown:focus {
    border-color: var(--v2-primary-500);
    box-shadow: 0 0 0 4px rgba(var(--v2-primary-500-rgb), 0.12);
}

.btn-primary,
.submit-btn,
.atf-contact-form .btn-primary {
    background: var(--v2-primary-500);
    border-color: var(--v2-primary-500);
    color: var(--v2-text-inverse);
}

.btn-primary:hover,
.submit-btn:hover,
.atf-contact-form .btn-primary:hover {
    background: var(--v2-primary-400);
    border-color: var(--v2-primary-400);
}

/* Support and purchasing page visual alignment */
.atf-support-area .atf-section-title h2 {
    font-size: 32px !important;
    line-height: 40px !important;
    font-weight: 500 !important;
    text-transform: none !important;
}

.atf-support-area .atf-section-title p,
.atf-support-area .tip-content p,
.atf-support-area .tip-list li,
.atf-support-area .form-check-label,
.atf-support-area .help-subtitle,
.atf-support-area .contact-value {
    font-size: 16px !important;
    line-height: 24px !important;
}

.atf-support-form-wrapper,
.support-tip-card,
.tip-icon,
.form-control,
.custom-file-upload,
.atf-support-form-wrapper,
.support-tip-card,
.tip-icon,
.stella-vita-section,
.file-upload-label,
.upload-placeholder,
.remove-file,
.submit-section,
.alert,
.help-card,
.help-icon-box,
.help-contact-item,
.contact-icon {
    border-radius: 8px !important;
}

.atf-support-area .section-title,
.atf-support-area .tip-content h4,
.atf-support-area .help-card h4 {
    font-size: 24px !important;
    line-height: 32px !important;
    font-weight: 500 !important;
}

.atf-support-area .form-group label,
.atf-support-area .form-control,
.atf-support-area .upload-placeholder,
.atf-support-area .file-types,
.atf-support-area .contact-label {
    font-size: 16px !important;
    line-height: 24px !important;
}

.atf-support-area .atf-themes-btn.btn-lg {
    border-radius: var(--v2-radius-button-pill, 22px) !important;
    font-size: 16px !important;
    line-height: 24px !important;
    font-weight: 600 !important;
    text-transform: none !important;
}

.atf-support-area ~ .atf-Subscribe-area .atf-subscribe-panel,
.atf-support-area ~ .atf-Subscribe-area .atf-subscribe-form,
.atf-support-area ~ .atf-Subscribe-area .atf-subscribe-input,
.atf-support-area ~ .atf-Subscribe-area .atf-subscribe-btn {
    border-radius: 8px !important;
}

.atf-support-area ~ .atf-Subscribe-area .atf-subscribe-copy h3 {
    font-size: 24px !important;
    line-height: 32px !important;
    font-weight: 500 !important;
}

.atf-support-area ~ .atf-Subscribe-area .atf-subscribe-btn {
    font-size: 16px !important;
    line-height: 24px !important;
}

.atf-support-area ~ .atf-Subscribe-area .atf-subscribe-input {
    font-size: 16px !important;
    line-height: 24px !important;
}

@media (max-width: 767px) {
    .atf-support-area .atf-section-title h2 {
        font-size: 24px !important;
        line-height: 32px !important;
        font-weight: 500 !important;
        text-transform: none !important;
    }

    .atf-support-area .section-title,
    .atf-support-area .tip-content h4,
    .atf-support-area .help-card h4 {
        font-size: 20px !important;
        line-height: 28px !important;
        font-weight: 500 !important;
    }

    .atf-support-area ~ .atf-Subscribe-area .atf-subscribe-copy h3 {
        font-size: 20px !important;
        line-height: 28px !important;
        font-weight: 500 !important;
    }

    .atf-support-area .atf-themes-btn.btn-lg {
        border-radius: 21px !important;
    }
}
@media (max-width: 767px) {
    .atf-support-area .file-upload-label i {
        margin-bottom: 10px;
        font-size: 32px;
    }
}
