/**
 * Student Setu SC/ST Validator - Custom Styles
 * Version: 1.0.0
 */

/* Material Symbols Configuration */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 24;
}

/* Custom Select Dropdown Styling */
select {
    cursor: pointer;
}

select:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Radio Button Enhancements */
input[type="radio"] {
    cursor: pointer;
}

input[type="radio"]:checked {
    background-color: #5048e5;
    border-color: #5048e5;
}

/* Smooth Transitions */
.ss-step {
    transition: opacity 0.3s ease-in-out;
}

.ss-step.hidden {
    display: none;
}

/* Animation for alerts */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Card Hover Effects */
.group:hover .material-symbols-outlined {
    color: #5048e5;
}

/* Progress Bar Animation */
.h-full.bg-primary {
    transition: width 0.5s ease-in-out;
}

/* Button States */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

button:not(:disabled):active {
    transform: scale(0.95);
}

/* Result Card Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#result-container > div {
    animation: fadeInUp 0.5s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #5048e5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d38b8;
}

/* Dark Mode Scrollbar */
.dark ::-webkit-scrollbar-track {
    background: #1a192e;
}

.dark ::-webkit-scrollbar-thumb {
    background: #5048e5;
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #5048e5;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Focus States for Accessibility */
button:focus,
select:focus,
input:focus {
    outline: 2px solid #5048e5;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    #btn-step1-next,
    #btn-step2-back,
    #btn-step3-back,
    #btn-check-scst,
    #btn-download-report {
        display: none;
    }

    .ss-step:not(#step-3) {
        display: none !important;
    }

    #step-3 {
        display: block !important;
    }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .material-symbols-outlined {
        font-size: 48px !important;
    }

    h1 {
        font-size: 1.875rem !important;
    }

    .grid.grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    button,
    select,
    input {
        border-width: 2px;
    }

    .border {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* WordPress Admin Bar Offset */
body.admin-bar #ss-scst-validator-wrapper {
    padding-top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar #ss-scst-validator-wrapper {
        padding-top: 46px;
    }
}

/* Plugin Container Reset */
#ss-scst-validator-wrapper * {
    box-sizing: border-box;
}

#ss-scst-validator-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure proper spacing in WordPress theme */
#ss-scst-validator-wrapper .layout-container {
    margin: 0 auto;
}

/* Custom color utilities not in Tailwind */
.text-primary {
    color: #5048e5;
}

.bg-primary {
    background-color: #5048e5;
}

.border-primary {
    border-color: #5048e5;
}

.ring-primary {
    --tw-ring-color: #5048e5;
}

/* Ensure icons are properly aligned */
.material-symbols-outlined {
    vertical-align: middle;
    display: inline-block;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Shadow utilities */
.shadow-primary {
    box-shadow: 0 4px 14px 0 rgba(80, 72, 229, 0.39);
}

/* Additional spacing utilities */
.gap-custom {
    gap: 1.5rem;
}
