/* JoinUs Portal - Custom Styles */

/* Utility classes to supplement Tailwind CDN */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-out {
    animation: fadeOut 0.3s ease-in-out;
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* File upload zone */
.upload-zone {
    transition: all 0.2s ease;
}

.upload-zone.dragover {
    border-color: #6366f1;
    background-color: #eef2ff;
}

/* Camera/Selfie capture */
.camera-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.camera-container video {
    width: 100%;
    height: auto;
    transform: scaleX(-1);
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.face-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 250px;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.face-guide.detected {
    border-color: #22c55e;
    border-style: solid;
}

/* Progress steps */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step-dot.active {
    background-color: #6366f1;
    color: white;
}

.step-dot.completed {
    background-color: #22c55e;
    color: white;
}

.step-dot.pending {
    background-color: #e5e7eb;
    color: #9ca3af;
}

.step-line {
    width: 40px;
    height: 2px;
    background-color: #e5e7eb;
    margin: 0 8px;
    transition: background-color 0.3s ease;
}

.step-line.completed {
    background-color: #22c55e;
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success {
    background-color: #22c55e;
    color: white;
}

.toast.error {
    background-color: #ef4444;
    color: white;
}

.toast.info {
    background-color: #3b82f6;
    color: white;
}

/* Form validation states */
.input-error {
    border-color: #ef4444 !important;
}

.input-success {
    border-color: #22c55e !important;
}

/* Checkbox/Radio custom styling */
.custom-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-checkbox:checked {
    background-color: #6366f1;
    border-color: #6366f1;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
}

/* Table responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Disabled state */
.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-draft { background-color: #f3f4f6; color: #6b7280; }
.badge-pending { background-color: #fef3c7; color: #d97706; }
.badge-reviewing { background-color: #dbeafe; color: #2563eb; }
.badge-interview { background-color: #e0e7ff; color: #4f46e5; }
.badge-approved { background-color: #d1fae5; color: #059669; }
.badge-rejected { background-color: #fee2e2; color: #dc2626; }
.badge-hired { background-color: #cffafe; color: #0891b2; }
