﻿/* --- KVAST FORM - REDESIGNED UI (STATIC COLORS) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Loader Styles */
.loader-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loader {
    border: 8px solid #f3f3f3;
    border-radius: 50%;
    border-top: 8px solid #3b82f6;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Main Page Layout */
.registration-page {
    font-family: 'Inter', sans-serif;
    background-color: #f7f8fa;
    color: #1f2937;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 6rem 2rem;
    min-height: 100vh;
}

.form-container {
    width: 100%;
    max-width: 1300px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    padding: 3rem 4rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

    .form-header h1 {
        font-size: 2.2rem;
        font-weight: 700;
        color: #1f2937;
    }

    .form-header p {
        color: #6b7280;
    }

.session-display {
    margin-top: 1rem;
    color: #6b7280;
}

    .session-display select {
        border: none;
        background: transparent;
        font-weight: 600;
        color: #2563eb;
        padding: 0;
        margin: 0;
        display: inline;
        width: auto;
        appearance: none;
    }

/* Form & Fieldset Styling */
fieldset {
    border: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
}

legend {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2563eb;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    width: 100%;
    border-bottom: 1px solid #d1d5db;
    display: flex;
    align-items: center;
}

.step-number {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #2563eb;
    color: #fff;
    font-size: 1rem;
    margin-right: 0.75rem;
}

.form-grid {
    display: grid;
    gap: 1.5rem;
}

.cols-1 {
    grid-template-columns: 1fr;
}

.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.form-group {
    display: flex;
    flex-direction: column;
}

    .form-group label {
        font-size: 0.9rem;
        font-weight: 500;
        color: #1f2937;
        margin-bottom: 0.5rem;
    }

input[type="text"], input[type="email"], input[type="date"], input[type="file"], select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    input:focus, select:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    }

    input[disabled], select[disabled] {
        background-color: #f3f4f6;
        cursor: not-allowed;
    }

.validation-error, .text-danger {
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 0.25rem;
}

.validation-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid #ef4444;
    border-radius: 8px;
    background-color: #fee2e2;
}

    .validation-summary ul {
        list-style-position: inside;
        color: #ef4444;
    }

.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 0.75rem;
}

    .checkbox-group input[type="checkbox"] {
        width: 1em;
        height: 1em;
        margin-right: 0.5rem;
        accent-color: #2563eb;
    }

    .checkbox-group label {
        margin-bottom: 0;
        font-size: 0.9rem;
        font-weight: 400;
    }

#photoPreview {
    display: none;
    margin-top: 1rem;
    max-width: 150px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    object-fit: cover;
}

/* Submission & Captcha Area */
.submission-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #d1d5db;
}

.captcha-wrapper {
    width: 100%;
    max-width: 350px;
    text-align: center;
}

    .captcha-wrapper label {
        font-weight: 600;
        color: #1f2937;
        display: block;
        margin-bottom: 0.5rem;
    }

.captcha-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

#captchaCanvas {
    flex-grow: 1;
    height: 50px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.captcha-refresh {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    border: 1px solid #d1d5db;
    outline: none;
    background: #fff;
    border-radius: 8px;
    color: #1f2937;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 1.2rem;
}

    .captcha-refresh:hover {
        background-color: #f3f4f6;
    }

#captcha-form {
    width: 100%;
}

.submit-button {
    background-color: #2563eb;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.8rem 2.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

    .submit-button:hover {
        background-color: #3b82f6;
        transform: translateY(-3px);
    }

/* Responsive Design */
@media (max-width: 992px) {
    .form-grid.cols-3, .form-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .registration-page {
        padding: 2rem 1rem;
    }

    .form-container {
        padding: 2rem;
    }

    .form-grid.cols-2, .form-grid.cols-3, .form-grid.cols-4 {
        grid-template-columns: 1fr;
    }

    .form-header h1 {
        font-size: 1.8rem;
    }
}
