/* Frontend styles for SparesSpace ID Verification */

.ss-id-verification-form-wrapper {
    max-width: 720px;
    margin: 30px auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ss-id-form-header h2 {
    margin: 0 0 4px;
    font-size: 1.7rem;
    font-weight: 600;
    color: #111827;
}

.ss-id-form-header p {
    margin: 0 0 16px;
    color: #6b7280;
}

.ss-id-form-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 18px;
    margin-top: 18px;
}

.ss-id-form-section h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: #111827;
}

.ss-id-form-group {
    margin-bottom: 14px;
}

.ss-id-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #374151;
}

.ss-id-form-group input[type="text"],
.ss-id-form-group input[type="date"],
.ss-id-form-group input[type="email"],
.ss-id-form-group select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 8px 10px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.ss-id-form-group input:focus,
.ss-id-form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
    outline: none;
}

.ss-id-form-group small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #6b7280;
}

.ss-id-document-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.ss-id-document-option {
    position: relative;
}

.ss-id-document-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ss-id-document-option label {
    display: block;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    cursor: pointer;
    background: #f9fafb;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.ss-id-document-option label:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.ss-id-document-option .document-icon {
    font-size: 24px;
    display: inline-block;
    margin-right: 8px;
}

.ss-id-document-option .document-title {
    display: block;
    font-weight: 600;
    color: #111827;
}

.ss-id-document-option .document-desc {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

.ss-id-document-option input[type="radio"]:checked + label {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
}

.ss-id-upload-area {
    margin-bottom: 14px;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    background: #f9fafb;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ss-id-upload-area.dragover {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
}

.ss-id-upload-area .upload-placeholder h4 {
    margin: 4px 0;
    font-size: 1rem;
    color: #111827;
}

.ss-id-upload-area .upload-placeholder p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.ss-id-upload-area .upload-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 4px;
}

.ss-id-upload-area .upload-preview {
    text-align: left;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-preview-image {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.file-preview-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

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

.file-name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    word-break: break-all;
}

.file-size {
    font-size: 11px;
    color: #6b7280;
}

.remove-file {
    border: none;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
}

.declaration-section {
    margin-top: 4px;
}

.ss-id-declaration {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #374151;
}

.ss-id-declaration input[type="checkbox"] {
    margin-top: 3px;
}

.ss-id-privacy-notice {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.ss-id-privacy-notice a {
    color: #2563eb;
    text-decoration: underline;
}

.ss-id-form-submit {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ss-id-submit-btn {
    border-radius: 9999px;
    border: none;
    padding: 9px 18px;
    background: linear-gradient(120deg, #2563eb, #4f46e5);
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.45);
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}

.ss-id-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.55);
}

.ss-id-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.ss-id-loading {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
}

.ss-id-loading .spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    border-top-color: #2563eb;
    animation: ss-id-spin 0.9s linear infinite;
}

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

.ss-id-form-messages {
    margin-top: 14px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
}

.ss-id-form-messages.success {
    background: #ecfdf5;
    border: 1px solid #22c55e;
    color: #166534;
}

.ss-id-form-messages.error {
    background: #fef2f2;
    border: 1px solid #f97373;
    color: #991b1b;
}

.ss-id-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ss-id-modal .modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    padding: 18px 20px 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
}

.ss-id-modal h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.ss-id-modal .modal-body {
    max-height: 320px;
    overflow-y: auto;
    font-size: 13px;
    color: #4b5563;
}

.ss-id-modal ol {
    margin: 0 0 10px 17px;
    padding: 0;
}

.ss-id-modal li {
    margin-bottom: 4px;
}

.ss-id-modal .modal-close {
    margin-top: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: #111827;
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
}

.ss-id-status-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 16px 18px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.ss-id-status-wrapper h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

/* Tracking & Status Card Styles */
.ss-id-status-card {
    padding: 25px;
    border-radius: 10px;
    background: #f9f9f9;
    border: 1px solid #eee;
    margin-top: 20px;
}

.ss-id-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.status-pending { background: #fff4e5; color: #b76e00; }
.status-approved { background: #e6f4ea; color: #1e7e34; }
.status-rejected { background: #fce8e6; color: #d93025; }
.status-under_review { background: #e8f0fe; color: #1967d2; }

.ss-id-status-row {
    display: flex; 
    justify-content: space-between; 
    padding: 12px 0; 
    border-bottom: 1px solid #e5e7eb;
}

.ss-id-status-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 14px;
}

.ss-id-status-value {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.ss-id-status-message {
    margin-top: 20px; 
    padding: 16px; 
    border-radius: 10px; 
    font-size: 14px;
    line-height: 1.6;
}

.message-pending { 
    background: linear-gradient(135deg, #fff9f0 0%, #fff4e5 100%); 
    border-left: 4px solid #ff9800; 
    color: #663c00;
}

.message-approved { 
    background: linear-gradient(135deg, #f0f9f1 0%, #e6f4ea 100%); 
    border-left: 4px solid #4caf50; 
    color: #1e4620;
}

.message-rejected { 
    background: linear-gradient(135deg, #fff5f5 0%, #fce8e6 100%); 
    border-left: 4px solid #f44336; 
    color: #5f2120;
}

.ss-id-status-icon-wrapper {
    text-align: center;
    margin-bottom: 16px;
}

.ss-id-status-icon {
    font-size: 48px;
    display: inline-block;
}

.ss-id-status-details {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

/* Enhanced Tracking Form Styles */
.ss-id-tracking-wrapper {
    max-width: 650px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
}

.ss-id-tracking-header {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 28px;
}

.ss-id-tracking-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 16px;
    margin-bottom: 16px;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.ss-id-tracking-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ss-id-tracking-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

.ss-id-tracking-form-enhanced {
    padding: 0;
}

.ss-id-reference-input-group {
    margin-bottom: 24px;
}

.ss-id-reference-input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.label-icon {
    font-size: 18px;
}

.ss-id-input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ss-id-input-wrapper input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.ss-id-input-wrapper input:valid {
    border-color: #10b981;
}

.input-helper-text {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
}

.input-helper-text svg {
    flex-shrink: 0;
    color: #94a3b8;
}

.ss-id-acknowledgment-enhanced {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.ss-id-acknowledgment-enhanced input[type="checkbox"] {
    display: none;
}

.ss-id-acknowledgment-enhanced label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #94a3b8;
    border-radius: 4px;
    background: #ffffff;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.ss-id-acknowledgment-enhanced input[type="checkbox"]:checked + label .checkbox-custom {
    background: #3b82f6;
    border-color: #3b82f6;
}

.ss-id-acknowledgment-enhanced input[type="checkbox"]:checked + label .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.privacy-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.privacy-link:hover {
    border-bottom-color: #3b82f6;
}

.ss-id-form-submit-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.ss-id-submit-btn-enhanced {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: all 0.2s ease;
}

.ss-id-submit-btn-enhanced:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.ss-id-submit-btn-enhanced:active:not(:disabled) {
    transform: translateY(0);
}

.ss-id-submit-btn-enhanced:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    display: flex;
    align-items: center;
}

.btn-icon svg {
    stroke: currentColor;
}

.ss-id-loading-enhanced {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.ss-id-tracking-help {
    display: flex;
    gap: 14px;
    margin-top: 32px;
    padding: 18px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 10px;
}

.help-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.help-content {
    flex: 1;
}

.help-content strong {
    display: block;
    font-size: 15px;
    color: #78350f;
    margin-bottom: 4px;
}

.help-content p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .ss-id-verification-form-wrapper {
        padding: 16px;
        margin: 16px 8px;
    }

    .ss-id-document-options {
        grid-template-columns: 1fr;
    }

    .file-preview {
        align-items: flex-start;
    }
    
    .ss-id-tracking-header h2 {
        font-size: 1.5rem;
    }
    
    .ss-id-tracking-icon {
        width: 56px;
        height: 56px;
    }
    
    .ss-id-tracking-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .ss-id-submit-btn-enhanced {
        width: 100%;
        justify-content: center;
    }
    
    .ss-id-tracking-help {
        flex-direction: column;
        text-align: center;
    }
}
