/* ========== Repair & After-Sales Service Page Styles ========== */
/* Optimized and minified version - ToupTek Astro */

/* ========== Page Banner ========== */
.atf-page-heading.atf-size-md {
    background-size: cover;
    background-attachment: fixed;
}

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

.support-tip-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    padding: 30px;
    height: 100%;
    display: flex;
    align-items: flex-start;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transition: all .4s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid rgba(220,53,69,0.08);
    position: relative;
    overflow: hidden;
}

.support-tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #dc3545, #ff6b7a);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.support-tip-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(220,53,69,0.12);
    border-color: rgba(220,53,69,0.2);
}

.support-tip-card:hover::before {
    transform: scaleX(1);
}

.tip-icon {
    flex-shrink: 0;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #dc3545, #ff6b7a);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    box-shadow: 0 5px 15px rgba(220,53,69,0.2);
}

.tip-icon i {
    font-size: 28px;
    color: #ffffff;
}

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

.tip-content p {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* ========== Form Wrapper ========== */
.atf-support-form-wrapper {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,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: linear-gradient(90deg, #dc3545, #ff6b7a, #dc3545);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

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

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

.section-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #dc3545, #ff6b7a);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(220,53,69,0.2);
}

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

.form-group label {
    color: #2c3e50;
    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 #e8ecef;
    border-radius: 10px;
    padding: 13px 18px;
    font-size: 15px;
    transition: all .3s cubic-bezier(0.4,0,0.2,1);
    background: #ffffff;
    color: #495057;
}

.form-control:hover {
    border-color: rgba(220,53,69,0.2);
    background: #fcfcfc;
}

.form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220,53,69,0.08);
    outline: 0;
    background: #ffffff;
}

.form-control:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: .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='%23dc3545' 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: 150px;
    line-height: 1.7;
}

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

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

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background: linear-gradient(135deg, #fff 0%, #fcfcfc 100%);
    border: 2px dashed #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 0;
    width: 100%;
}

.file-upload-label:hover {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff 0%, rgba(220,53,69,0.03) 100%);
}

.file-upload-label i {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 15px;
    transition: all .3s ease;
}

.file-upload-label:hover i {
    transform: scale(1.15);
    color: #ff6b7a;
}

.upload-text {
    font-size: 16px;
    color: #495057;
    font-weight: 500;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 13px;
    color: #6c757d;
}

.custom-file-upload.dragover .file-upload-label {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff 0%, rgba(220,53,69,0.05) 100%);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    transition: all .3s cubic-bezier(0.4,0,0.2,1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(220,53,69,0.05);
    border-radius: 50%;
    transition: all .5s ease;
}

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

.upload-placeholder i {
    font-size: 60px;
    color: #dc3545;
    margin-bottom: 15px;
    transition: all .3s ease;
}

.upload-placeholder p {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.file-types {
    color: #6c757d;
    font-size: 13px;
}

.custom-file-upload input[type="file"]:hover + .upload-placeholder,
.custom-file-upload input[type="file"]:focus + .upload-placeholder,
.custom-file-upload.dragover .upload-placeholder {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff 0%, rgba(220,53,69,0.03) 100%);
}

.custom-file-upload.dragover .upload-placeholder i {
    transform: scale(1.15);
    color: #ff6b7a;
}

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

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

.size-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc3545, #ff6b7a);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.size-bar-fill.warning {
    background: linear-gradient(90deg, #ffc107, #ff9800);
}

.size-text {
    font-size: 13px;
    color: #6c757d;
    text-align: center;
}

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

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 10px;
    margin-bottom: 12px;
    animation: slideInUp .3s ease;
    border: 1px solid rgba(220,53,69,0.08);
    transition: all .3s ease;
}

.file-item:hover {
    background: linear-gradient(135deg, #ffffff, rgba(220,53,69,0.02));
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

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

.file-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dc3545, #ff6b7a);
    border-radius: 10px;
    margin-right: 15px;
}

.file-icon i {
    font-size: 22px;
    color: #ffffff;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 4px;
    word-break: break-word;
}

.file-size {
    color: #6c757d;
    font-size: 12px;
}

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

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

/* ========== Submit Section ========== */
.submit-section {
    background: linear-gradient(135deg, #fafbfc 0%, rgba(220,53,69,0.02) 100%);
    border-radius: 15px;
    padding: 35px;
    margin-top: 25px;
}

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

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

.form-check-input:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

.form-check-label {
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    max-width: 600px;
    line-height: 1.6;
}

.form-check-label a {
    color: #dc3545;
    text-decoration: underline;
    font-weight: 500;
}

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

/* ========== Submit Button ========== */
.atf-themes-btn.btn-lg {
    padding: 18px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #dc3545, #ff6b7a);
    border: 0;
    color: #ffffff;
    transition: all .3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(220,53,69,0.25);
}

.atf-themes-btn.btn-lg:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: all .5s ease;
}

.atf-themes-btn.btn-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(220,53,69,0.35);
    background: linear-gradient(135deg, #ff6b7a, #dc3545);
}

.atf-themes-btn.btn-lg:hover:before {
    width: 300px;
    height: 300px;
}

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

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

/* ========== Alerts ========== */
.alert {
    border-radius: 12px;
    padding: 18px 24px;
    animation: fadeIn .5s ease;
    border: 0;
    margin-top: 20px;
}

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

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

.alert i {
    margin-right: 12px;
    font-size: 22px;
}

.alert strong {
    font-weight: 600;
}

/* ========== Help Section ========== */
.support-help-section {
    margin-top: 60px;
}

.help-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.06);
    border-left: 5px solid #dc3545;
}

.help-card h4 {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: 600;
}

.help-card h4 i {
    margin-right: 10px;
    color: #dc3545;
}

.help-card p {
    color: #495057;
    margin-bottom: 15px;
}

.help-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-card ul li {
    padding: 10px 0;
    color: #6c757d;
    font-size: 15px;
    display: flex;
    align-items: flex-start;
}

.help-card ul li:before {
    content: '→';
    color: #dc3545;
    font-weight: bold;
    margin-right: 12px;
    font-size: 18px;
}

.help-card a {
    color: #dc3545;
    text-decoration: none;
    font-weight: 500;
}

.help-card a:hover {
    text-decoration: underline;
}

/* ========== Validation ========== */
.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.15);
}

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

/* ========== Loading Overlay ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    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 #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

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

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

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

    .section-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

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

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

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

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

    .upload-placeholder {
        height: 160px;
    }

    .upload-placeholder i {
        font-size: 48px;
    }

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

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

    .help-card {
        padding: 25px;
    }
}

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

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

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

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

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

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

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

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

    .submit-section {
        padding: 28px 22px;
    }

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