/* ===================================
   Registration Page Complete Styles
   JobTermin - register.css
   ✅ INCLUDES ROLE SELECTOR FIX
   =================================== */

/* Registration Page Specific Overrides */
.page-template-page-register .auth-page {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1425 100%);
}

/* Animated Background Orbs */
.page-template-page-register .auth-page::before {
    animation: float 8s ease-in-out infinite;
}

.page-template-page-register .auth-page::after {
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(20px, -20px);
    }
    50% {
        transform: translate(-10px, 10px);
    }
    75% {
        transform: translate(15px, 15px);
    }
}

/* Registration Specific Branding Enhancements */
.page-template-page-register .auth-logo {
    animation: fadeInDown 0.8s ease-out;
}

.page-template-page-register .auth-branding h1 {
    background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #22d3ee 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Registration Benefits Animation */
.page-template-page-register .auth-benefit {
    opacity: 0;
    animation: slideInLeft 0.6s ease-out forwards;
}

.page-template-page-register .auth-benefit:nth-child(1) {
    animation-delay: 0.2s;
}

.page-template-page-register .auth-benefit:nth-child(2) {
    animation-delay: 0.3s;
}

.page-template-page-register .auth-benefit:nth-child(3) {
    animation-delay: 0.4s;
}

.page-template-page-register .auth-benefit:nth-child(4) {
    animation-delay: 0.5s;
}

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

/* ===================================
   ✅ ROLE SELECTOR - CRITICAL FIX
   =================================== */

/* Role selector container */
.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Role option wrapper */
.role-option {
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide the actual radio button */
.role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Role card styling */
.role-card {
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(51, 65, 85, 0.6);
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Hover effect */
.role-option:hover .role-card {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(34, 211, 238, 0.08);
    transform: translateY(-2px);
}

/* Active state */
.role-option.active .role-card {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-color: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2), 
                0 4px 12px rgba(34, 211, 238, 0.3);
}

/* Role icon */
.role-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.role-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: #22d3ee;
}

.role-option:hover .role-icon {
    background: rgba(34, 211, 238, 0.2);
    transform: scale(1.1);
}

.role-option.active .role-icon {
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
}

.role-option.active .role-icon svg {
    color: #ffffff;
}

/* Role content */
.role-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 0.25rem 0;
    transition: color 0.3s ease;
}

.role-content p {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0;
    transition: color 0.3s ease;
}

.role-option.active .role-content h4 {
    color: #22d3ee;
}

.role-option.active .role-content p {
    color: #cffafe;
}

/* Checkmark indicator */
.role-card::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: #22d3ee;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 900;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-option.active .role-card::after {
    opacity: 1;
    transform: scale(1);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .role-selector {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .role-card {
        padding: 1.25rem 0.875rem;
    }
}

/* ===================================
   END ROLE SELECTOR FIX
   =================================== */

/* Registration Form Enhancements */
.page-template-page-register .auth-form {
    animation: fadeIn 1s ease-out;
}

.page-template-page-register .form-group {
    animation: fadeInUp 0.6s ease-out backwards;
}

.page-template-page-register .form-group:nth-child(1) { animation-delay: 0.1s; }
.page-template-page-register .form-group:nth-child(2) { animation-delay: 0.15s; }
.page-template-page-register .form-group:nth-child(3) { animation-delay: 0.2s; }
.page-template-page-register .form-group:nth-child(4) { animation-delay: 0.25s; }
.page-template-page-register .form-group:nth-child(5) { animation-delay: 0.3s; }
.page-template-page-register .form-group:nth-child(6) { animation-delay: 0.35s; }
.page-template-page-register .form-group:nth-child(7) { animation-delay: 0.4s; }
.page-template-page-register .form-group:nth-child(8) { animation-delay: 0.45s; }

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

/* Role Selector Specific Animations */
.page-template-page-register .role-option {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-template-page-register .role-option.active {
    animation: pulse 0.5s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.page-template-page-register .role-option.active .role-icon {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced Input Focus Effects */
.page-template-page-register .input-wrapper input:focus {
    animation: inputGlow 0.3s ease-out;
}

@keyframes inputGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 211, 238, 0);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.2);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
    }
}

/* Submit Button Loading State Enhancement */
.page-template-page-register .btn-submit:disabled {
    background: linear-gradient(90deg, 
        rgba(6, 182, 212, 0.6) 0%, 
        rgba(59, 130, 246, 0.6) 25%, 
        rgba(6, 182, 212, 0.6) 50%, 
        rgba(59, 130, 246, 0.6) 75%, 
        rgba(6, 182, 212, 0.6) 100%
    );
    background-size: 200% auto;
    animation: shimmerButton 2s linear infinite;
}

@keyframes shimmerButton {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Success Message Animation */
.page-template-page-register .auth-success {
    animation: successSlide 0.5s ease-out, successPulse 1s ease-out 0.5s;
}

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

@keyframes successPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0.1);
    }
}

/* Error Message Shake Animation */
.page-template-page-register .auth-error {
    animation: errorShake 0.5s ease-out;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Password Strength Indicator */
.password-strength-meter {
    height: 4px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.password-strength-bar.medium {
    width: 66%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.password-strength-bar.strong {
    width: 100%;
    background: linear-gradient(90deg, #22c55e, #86efac);
}

/* Terms Checkbox Animation */
.page-template-page-register .checkbox-custom {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-template-page-register .checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    animation: checkboxPop 0.3s ease-out;
}

@keyframes checkboxPop {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Trust Badge Enhancement */
.page-template-page-register .auth-trust {
    position: relative;
}

.page-template-page-register .auth-trust::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(34, 211, 238, 0.5) 50%, 
        transparent 100%
    );
}

/* Mobile Specific Enhancements */
@media (max-width: 768px) {
    .page-template-page-register .auth-branding {
        background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
    }

    .page-template-page-register .auth-container {
        border-radius: 1rem;
        margin: 1rem 0;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .page-template-page-register * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .page-template-page-register .input-wrapper input {
        border-width: 2px;
    }

    .page-template-page-register .role-card {
        border-width: 3px;
    }

    .page-template-page-register .btn-submit {
        border: 2px solid #22d3ee;
    }
}

/* Print Styles */
@media print {
    .page-template-page-register .auth-page::before,
    .page-template-page-register .auth-page::after,
    .page-template-page-register .auth-branding {
        display: none;
    }

    .page-template-page-register .auth-container {
        border: 1px solid #000;
        box-shadow: none;
    }
}

/* Focus Visible Enhancement */
.page-template-page-register *:focus-visible {
    outline: 3px solid #22d3ee;
    outline-offset: 3px;
    border-radius: 0.25rem;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(51, 65, 85, 0.4) 0%, 
        rgba(51, 65, 85, 0.6) 50%, 
        rgba(51, 65, 85, 0.4) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Confetti Effect */
@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #22d3ee;
    animation: confetti-fall 3s linear forwards;
    z-index: 9999;
}

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

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