/**
 * Support Form Styles
 * S-TechSMD Repair Centre
 */

/* ============================================================================
   LAYOUT
   ============================================================================ */

.section-bg {
    padding: 60px 0;
}

.section-bg .container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1024px) {
    .section-bg .container {
        grid-template-columns: 1fr;
    }
}

.page-header {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 20px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================================
   SUPPORT FORM CONTAINER
   ============================================================================ */

.support-form-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

@media (max-width: 640px) {
    .support-form-container {
        padding: 24px;
        border-radius: 12px;
    }
}

/* ============================================================================
   STEPS INDICATOR
   ============================================================================ */

.support-steps {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
    position: relative;
}

.support-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: var(--border-color);
}

.support-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.support-step.active .step-number,
.support-step.completed .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.support-step.completed .step-number::after {
    content: '\2713';
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.support-step.active .step-label {
    color: var(--primary-color);
}

/* ============================================================================
   FORM STEPS
   ============================================================================ */

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.step-header {
    text-align: center;
    margin-bottom: 32px;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.step-description {
    color: var(--text-light);
    font-size: 15px;
}

/* ============================================================================
   IDENTIFICATION BOX
   ============================================================================ */

.identification-box {
    max-width: 500px;
    margin: 0 auto 24px;
}

.input-with-button {
    display: flex;
    gap: 12px;
}

.input-with-button .form-control {
    flex: 1;
}

.input-with-button .btn {
    flex-shrink: 0;
    min-width: 100px;
}

/* Input with Icon (Live-Validierung) */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .form-control {
    padding-right: 80px;
}

.input-status-icon {
    position: absolute;
    right: 45px;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.input-status-icon.status-success {
    color: #059669;
    opacity: 1;
}

.input-status-icon.status-info {
    color: #3B82F6;
    opacity: 1;
}

.input-status-icon.status-repair {
    color: #F59E0B;
    opacity: 1;
}

.input-status-icon.status-error {
    color: #EF4444;
    opacity: 1;
}

.input-loading {
    position: absolute;
    right: 16px;
    display: inline-flex;
    align-items: center;
}

.spinner-sm {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================================================
   LOOKUP RESULT
   ============================================================================ */

.lookup-result {
    max-width: 500px;
    margin: 0 auto 24px;
}

.result-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.result-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.result-repair {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.result-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.result-success .result-icon {
    color: #059669;
}

.result-info .result-icon {
    color: #2563eb;
}

.result-repair .result-icon {
    color: #D97706;
}

/* Ticket/Repair Reference Badges */
.ticket-ref-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    font-family: monospace;
}

.repair-ref-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #F59E0B;
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    font-family: monospace;
}

.link-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #059669;
    font-weight: 500;
}

.result-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.result-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-dark);
}

/* ============================================================================
   GUEST FIELDS
   ============================================================================ */

.guest-fields {
    max-width: 500px;
    margin: 0 auto 24px;
    padding: 24px;
    background: var(--light-bg);
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

/* ============================================================================
   PRIORITY OPTIONS
   ============================================================================ */

.priority-options {
    display: flex;
    gap: 16px;
}

@media (max-width: 640px) {
    .priority-options {
        flex-direction: column;
    }
}

.priority-option {
    flex: 1;
    cursor: pointer;
}

.priority-option input {
    display: none;
}

.priority-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    transition: all 0.2s ease;
    text-align: center;
}

.priority-option input:checked + .priority-card {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.priority-card:hover {
    border-color: var(--text-light);
}

.priority-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.priority-low .priority-icon {
    color: #6B7280;
}

.priority-normal .priority-icon {
    color: #3B82F6;
}

.priority-high .priority-icon {
    color: #EF4444;
}

.priority-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.priority-desc {
    font-size: 12px;
    color: var(--text-light);
}

/* ============================================================================
   FILE UPLOAD
   ============================================================================ */

.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--light-bg);
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.file-upload-icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: var(--text-light);
}

.file-upload-text {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.file-upload-browse {
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
}

.file-upload-hint {
    font-size: 13px;
    color: var(--text-light);
}

.file-input-hidden {
    display: none;
}

/* File Preview List */
.file-preview-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.file-preview-icon {
    font-size: 24px;
}

.file-preview-info {
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    font-size: 12px;
    color: var(--text-light);
}

.file-preview-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--light-bg);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.file-preview-remove:hover {
    background: #FEE2E2;
    color: #EF4444;
}

/* ============================================================================
   STEP ACTIONS
   ============================================================================ */

.step-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.step-actions .btn-lg {
    min-width: 200px;
}

/* ============================================================================
   SUCCESS MESSAGE
   ============================================================================ */

.success-container {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
}

.success-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.success-ticket {
    font-size: 1.125rem;
    margin-bottom: 16px;
}

.success-ticket strong {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-size: 1.25rem;
    letter-spacing: 1px;
}

.success-text {
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.6;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================================================
   SIDEBAR
   ============================================================================ */

.support-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 1024px) {
    .support-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-card {
        flex: 1;
        min-width: 280px;
    }
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.sidebar-card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.sidebar-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.sidebar-card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.sidebar-card a {
    color: var(--primary-color);
}

.sidebar-phone {
    font-size: 1.25rem !important;
    font-weight: 700;
    color: var(--text-dark) !important;
}

.sidebar-hours {
    font-size: 13px;
}

.sidebar-response {
    font-size: 13px;
    color: #059669 !important;
    font-weight: 500;
}

/* ============================================================================
   FORM ELEMENTS (Shared)
   ============================================================================ */

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: ' *';
    color: #EF4444;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-dark);
    background: white;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: #9CA3AF;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.text-muted {
    color: var(--text-light) !important;
}

.hidden {
    display: none !important;
}

/* ============================================================================
   MODAL (Existing Ticket)
   ============================================================================ */

.support-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.support-modal {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

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

.support-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.support-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.support-modal-body {
    padding: 24px;
}

.support-modal-body p {
    margin: 0 0 16px;
    color: var(--text-dark);
    font-size: 14px;
}

.existing-ticket-info {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ticket-ref-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.modal-question {
    color: var(--text-light) !important;
    font-size: 13px !important;
}

.support-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-modal-footer .btn {
    width: 100%;
}

/* ============================================================================
   PRIVACY MODE RESULT BOXES
   ============================================================================ */

.result-magic-link {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.result-magic-link .result-icon {
    color: #6b7280;
}

.result-greeting {
    background: #ecfdf5;
    border-color: #10b981;
}

.result-greeting .result-icon {
    color: #10b981;
}

.result-obfuscated {
    background: #fefce8;
    border-color: #eab308;
}

.result-obfuscated .result-icon {
    color: #eab308;
}

.obfuscated-value {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: #6b7280;
}
