/* JAMB Career Advisor Styles - Updated Design */
.jamb-advisor-widget {
    max-width: 700px;
    margin: 40px auto;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 24px;
    padding: 60px 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1a1a1a;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.jca-header {
    margin-bottom: 40px;
}

.jca-header h2 {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1565c0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.jca-header p {
    font-size: 1.2rem;
    color: #424242;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

.jca-form {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.jca-form-group {
    margin-bottom: 24px;
}

.jca-form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.15rem;
    color: #1565c0;
    text-align: left;
}

.jca-form-group input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    background: #ffffff;
    color: #333;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.jca-form-group input[type="text"]:focus {
    outline: none;
    border-color: #2196f3;
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.jca-form-group input[type="text"]::placeholder {
    color: #9e9e9e;
    opacity: 1;
    font-size: 0.95rem;
}

.jca-submit-btn {
    width: 100%;
    padding: 18px 24px;
    background: #2196f3;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    font-family: inherit;
}

.jca-submit-btn:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}

.jca-submit-btn:active {
    transform: translateY(0px);
}

.jca-submit-btn:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

.jca-loading {
    display: inline-block;
}

.jca-loading::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 2px solid white;
    animation: jca-spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

.jca-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.jca-error h4 {
    margin-bottom: 10px;
    margin-top: 0;
    color: #d32f2f;
    font-size: 1.1rem;
    font-weight: 600;
}

.jca-error p {
    margin: 0;
    line-height: 1.5;
    color: #d32f2f;
}

.jca-results {
    margin-top: 40px;
    animation: jca-fadeInUp 0.6s ease-out;
    text-align: left;
}

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

.jca-result-section {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.4);
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.jca-result-section:hover {
    background: rgba(255,255,255,1);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.jca-result-section h3 {
    color: #1565c0;
    margin-bottom: 16px;
    margin-top: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jca-result-section p, 
.jca-result-section ul {
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 12px;
    color: #424242;
}

.jca-result-section p:last-child {
    margin-bottom: 0;
}

.jca-result-section ul {
    padding-left: 20px;
    margin-top: 0;
}

.jca-result-section ul:last-child {
    margin-bottom: 0;
}

.jca-result-section li {
    margin-bottom: 8px;
    color: #424242;
}

.jca-result-section li:last-child {
    margin-bottom: 0;
}

/* Theme Variations */
.jca-theme-blue {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.jca-theme-blue .jca-header h2,
.jca-theme-blue .jca-form-group label,
.jca-theme-blue .jca-result-section h3 {
    color: #1565c0;
}

.jca-theme-blue .jca-submit-btn {
    background: #2196f3;
}

.jca-theme-blue .jca-submit-btn:hover {
    background: #1976d2;
}

.jca-theme-green {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.jca-theme-green .jca-header h2,
.jca-theme-green .jca-form-group label,
.jca-theme-green .jca-result-section h3 {
    color: #2e7d32;
}

.jca-theme-green .jca-submit-btn {
    background: #4caf50;
}

.jca-theme-green .jca-submit-btn:hover {
    background: #388e3c;
}

.jca-theme-orange {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
}

.jca-theme-orange .jca-header h2,
.jca-theme-orange .jca-form-group label,
.jca-theme-orange .jca-result-section h3 {
    color: #ef6c00;
}

.jca-theme-orange .jca-submit-btn {
    background: #ff9800;
}

.jca-theme-orange .jca-submit-btn:hover {
    background: #f57c00;
}

.jca-theme-purple {
    background: linear-gradient(135deg, #f3e5f5 0%, #ce93d8 100%);
}

.jca-theme-purple .jca-header h2,
.jca-theme-purple .jca-form-group label,
.jca-theme-purple .jca-result-section h3 {
    color: #7b1fa2;
}

.jca-theme-purple .jca-submit-btn {
    background: #9c27b0;
}

.jca-theme-purple .jca-submit-btn:hover {
    background: #7b1fa2;
}

/* Admin Notice Styles */
.jca-admin-notice {
    padding: 16px 20px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    margin: 0 0 20px 0;
    text-align: left;
}

.jca-admin-notice p {
    margin: 0;
    color: #f57c00;
    font-weight: 500;
}

.jca-admin-notice strong {
    color: #ef6c00;
}

.jca-admin-notice a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 600;
}

.jca-admin-notice a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jamb-advisor-widget {
        margin: 20px 10px;
        padding: 40px 24px;
    }
    
    .jca-header h2 {
        font-size: 2.2rem;
    }
    
    .jca-header p {
        font-size: 1.1rem;
    }
    
    .jca-form {
        padding: 30px 20px;
    }
    
    .jca-result-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .jamb-advisor-widget {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .jca-header h2 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .jca-header p {
        font-size: 1rem;
    }
    
    .jca-form {
        padding: 24px 16px;
    }
    
    .jca-form-group input[type="text"] {
        padding: 14px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .jca-submit-btn {
        padding: 16px 20px;
        font-size: 1rem;
        letter-spacing: 0.3px;
    }
    
    .jca-result-section {
        padding: 16px;
    }
    
    .jca-result-section h3 {
        font-size: 1.2rem;
    }
}

/* Accessibility Improvements */
.jca-form-group input[type="text"]:focus,
.jca-submit-btn:focus {
    outline: 2px solid #2196f3;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .jamb-advisor-widget {
        border: 2px solid #000;
        background: #fff;
    }
    
    .jca-form {
        border: 2px solid #000;
        background: #fff;
    }
    
    .jca-result-section {
        border: 2px solid #000;
        background: #fff;
    }
    
    .jca-header h2,
    .jca-form-group label,
    .jca-result-section h3 {
        color: #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .jca-loading::after {
        animation: none;
    }
}

/* Print styles */
@media print {
    .jamb-advisor-widget {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 2px solid black;
        page-break-inside: avoid;
    }
    
    .jca-form,
    .jca-result-section {
        background: white !important;
        border: 1px solid black !important;
    }
    
    .jca-submit-btn {
        background: white !important;
        color: black !important;
        border: 2px solid black !important;
    }
}

/* Elementor specific adjustments */
.elementor-widget-jca_widget .jamb-advisor-widget {
    margin: 0;
}

.elementor-editor-active .jamb-advisor-widget {
    pointer-events: none;
}

.elementor-editor-active .jca-form {
    opacity: 0.8;
}

/* Loading state improvements */
.jca-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.jca-form.loading input,
.jca-form.loading button {
    cursor: not-allowed;
}

/* Success state animation */
.jca-results.show {
    animation: jca-slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes jca-slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 3000px;
    }
}

/* Error state improvements */
.jca-error.shake {
    animation: jca-shake 0.6s ease-in-out;
}

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

/* Custom styling support */
.jca-custom-bg {
    background: var(--jca-bg-color, linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%)) !important;
}

.jca-custom-text {
    color: var(--jca-text-color, #1a1a1a) !important;
}

.jca-custom-form {
    background: var(--jca-form-bg, rgba(255,255,255,0.9)) !important;
    border-color: var(--jca-form-border, rgba(255,255,255,0.3)) !important;
}

.jca-custom-button {
    background: var(--jca-button-bg, #2196f3) !important;
    color: var(--jca-button-text, white) !important;
}

.jca-custom-button:hover {
    background: var(--jca-button-hover, #1976d2) !important;
}