/**
 * Public Styles for Gov Exam Eligibility Checker
 * Modern, Clean, Responsive Design
 */

/* CSS Variables from Settings */
:root {
    --gee-bg-color: #f3f4f6;
    --gee-card-color: #ffffff;
    --gee-text-color: #1f2937;
    --gee-button-color: #3b82f6;
    --gee-success-color: #10b981;
    --gee-fail-color: #6366f1;
    
    /* Additional design tokens */
    --gee-border-radius: 12px;
    --gee-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --gee-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --gee-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gee-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
.gee-checker-wrapper,
.gee-checker-wrapper * {
    box-sizing: border-box;
}

/* Main Wrapper */
.gee-checker-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.gee-checker-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease;
}

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

.gee-title {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 700;
    color: var(--gee-text-color);
    margin: 0 0 12px 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gee-subtitle {
    font-size: clamp(14px, 3vw, 18px);
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

/* Form Container */
.gee-checker-form {
    background: var(--gee-card-color);
    border-radius: var(--gee-border-radius);
    padding: clamp(20px, 5vw, 40px);
    box-shadow: var(--gee-shadow-lg);
    animation: fadeInUp 0.6s ease 0.2s both;
}

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

/* Form Row */
.gee-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Form Group */
.gee-form-group {
    display: flex;
    flex-direction: column;
}

.gee-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gee-text-color);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

/* Select Dropdown */
.gee-select {
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: var(--gee-text-color);
    background: #fff;
    transition: var(--gee-transition);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

.gee-select:hover {
    border-color: #d1d5db;
}

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

.gee-select:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Eligibility Criteria Section */
.gee-eligibility-criteria {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #f0f9ff 0%, #f5f3ff 100%);
    border-radius: var(--gee-border-radius);
    border: 2px dashed #c7d2fe;
    animation: slideIn 0.5s ease;
}

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

.gee-eligibility-criteria h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gee-text-color);
    margin: 0 0 8px 0;
}

.gee-instruction {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px 0;
}

/* Criteria Section */
.gee-criteria-section {
    margin-bottom: 24px;
}

.gee-criteria-section:last-of-type {
    margin-bottom: 0;
}

.gee-criteria-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gee-text-color);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

/* Checkbox Group */
.gee-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gee-checkbox-label {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--gee-transition);
    position: relative;
    overflow: hidden;
}

.gee-checkbox-label:hover {
    border-color: var(--gee-button-color);
    transform: translateX(4px);
}

.gee-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--gee-button-color);
}

.gee-checkbox-label span {
    font-size: 15px;
    color: var(--gee-text-color);
    line-height: 1.5;
    flex: 1;
}

.gee-checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--gee-button-color);
}

/* Button Styles */
.gee-button {
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gee-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
}

.gee-button-primary {
    background: var(--gee-button-color);
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
    margin-top: 20px;
    width: 100%;
}

.gee-button-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.gee-button-primary:active {
    transform: translateY(0);
}

/* Loading Animation */
.gee-loading {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.3s ease;
}

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

.gee-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--gee-button-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.gee-loading p {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
}

/* Result Section */
.gee-result {
    margin-top: 30px;
    padding: 40px;
    border-radius: var(--gee-border-radius);
    text-align: center;
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Qualified Result */
.gee-result.gee-qualified {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 3px solid var(--gee-success-color);
    box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.2);
}

.gee-result.gee-qualified:before {
    content: "🎉";
    position: absolute;
    font-size: 100px;
    top: -20px;
    right: -20px;
    opacity: 0.2;
}

.gee-result.gee-qualified .gee-result-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Not Qualified Result */
.gee-result.gee-not-qualified {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 3px solid var(--gee-fail-color);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.2);
}

.gee-result.gee-not-qualified:before {
    content: "💪";
    position: absolute;
    font-size: 100px;
    top: -20px;
    left: -20px;
    opacity: 0.2;
}

.gee-result-message {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.gee-result.gee-qualified .gee-result-message {
    color: #065f46;
}

.gee-result.gee-not-qualified .gee-result-message {
    color: #4338ca;
}

.gee-result-submessage {
    font-size: clamp(14px, 3vw, 18px);
    margin-bottom: 16px;
    color: #374151;
}

.gee-result-quote {
    font-size: clamp(14px, 3vw, 16px);
    font-style: italic;
    color: #6b7280;
    margin: 20px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border-left: 4px solid;
}

.gee-result.gee-qualified .gee-result-quote {
    border-left-color: var(--gee-success-color);
}

.gee-result.gee-not-qualified .gee-result-quote {
    border-left-color: var(--gee-fail-color);
}

.gee-result-missing {
    font-size: 14px;
    color: #991b1b;
    background: rgba(254, 202, 202, 0.5);
    padding: 12px;
    border-radius: 6px;
    margin-top: 16px;
}

/* WhatsApp Button */
.gee-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: #25d366;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    margin-top: 20px;
    transition: var(--gee-transition);
    box-shadow: 0 4px 6px -1px rgba(37, 211, 102, 0.4);
}

.gee-whatsapp-btn:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 211, 102, 0.5);
    color: #fff;
}

.gee-whatsapp-btn:before {
    content: "📱";
    font-size: 24px;
}

/* Exam Details Section */
.gee-exam-details {
    margin-top: 40px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

/* Exam Article */
.gee-exam-article {
    background: var(--gee-card-color);
    border-radius: var(--gee-border-radius);
    padding: clamp(20px, 5vw, 40px);
    box-shadow: var(--gee-shadow-lg);
}

.gee-exam-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e5e7eb;
}

.gee-exam-title {
    font-size: clamp(24px, 5vw, 40px);
    font-weight: 700;
    color: var(--gee-text-color);
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.gee-exam-categories {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.gee-category-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Official Website Button */
.gee-official-website {
    margin-top: 20px;
    text-align: center;
}

.gee-website-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--gee-transition);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

.gee-website-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.5);
    color: #fff;
}

/* Exam Section */
.gee-exam-section {
    margin-bottom: 25px;
}

.gee-section-title {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 700;
    color: var(--gee-text-color);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #e5e7eb;
    position: relative;
}

.gee-section-title:before {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gee-button-color), transparent);
}

/* Eligibility Section in Article */
.gee-eligibility-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 20px;
    border-radius: var(--gee-border-radius);
    border: 2px solid #fbbf24;
}

.gee-eligibility-group {
    margin-bottom: 18px;
}

.gee-eligibility-group:last-child {
    margin-bottom: 0;
}

.gee-eligibility-group h3 {
    font-size: 18px;
    font-weight: 600;
    color: #78350f;
    margin: 0 0 12px 0;
}

.gee-criteria-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gee-criteria-list li {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #374151;
    transition: var(--gee-transition);
}

.gee-criteria-list li:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(4px);
}

.gee-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Content Section */
.gee-content {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

.gee-content p {
    margin-bottom: 16px;
}

.gee-content ul,
.gee-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.gee-content li {
    margin-bottom: 8px;
}

.gee-content a {
    color: var(--gee-button-color);
    text-decoration: underline;
    transition: color 0.2s;
}

.gee-content a:hover {
    color: #2563eb;
}

.gee-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.gee-content th,
.gee-content td {
    padding: 12px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.gee-content th {
    background: #f9fafb;
    font-weight: 600;
}

/* Materials Section */
.gee-materials-section {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 20px;
    border-radius: var(--gee-border-radius);
    border: 2px solid #3b82f6;
}

.gee-materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.gee-material-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 18px;
    border-radius: var(--gee-border-radius);
    box-shadow: var(--gee-shadow);
    transition: var(--gee-transition);
}

.gee-material-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--gee-shadow-lg);
}

.gee-material-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gee-text-color);
    margin: 0 0 16px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gee-checker-wrapper {
        padding: 16px;
        margin: 20px auto;
    }
    
    .gee-checker-form {
        padding: 20px;
    }
    
    .gee-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .gee-result {
        padding: 24px;
    }
    
    .gee-materials-grid {
        grid-template-columns: 1fr;
    }
    
    .gee-exam-article {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .gee-checker-form,
    .gee-whatsapp-btn,
    .gee-button {
        display: none;
    }
    
    .gee-exam-article {
        box-shadow: none;
    }
}

/* Rain Animation (for not qualified) */
@keyframes rain {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 20% 100%;
    }
}

.gee-result.gee-not-qualified.with-rain {
    background-image: 
        linear-gradient(135deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.1) 41%, transparent 41%, transparent 100%),
        linear-gradient(135deg, transparent 0%, transparent 48%, rgba(255, 255, 255, 0.1) 48%, rgba(255, 255, 255, 0.1) 49%, transparent 49%, transparent 100%),
        linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    background-size: 10px 10px, 20px 20px, 100% 100%;
    animation: rain 20s linear infinite;
}

/* Accessibility */
.gee-button:focus,
.gee-select:focus,
.gee-checkbox-label input:focus {
    outline: 2px solid var(--gee-button-color);
    outline-offset: 2px;
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --gee-bg-color: #1f2937;
        --gee-card-color: #374151;
        --gee-text-color: #f9fafb;
    }
}
