/* ==========================================================================
   Workshop Registration & Survey Forms - Styles
   ========================================================================== */

:root {
    --monmouth-blue: #002855;
    --monmouth-light-blue: #0d64b2;
    --monmouth-orange: #E57200;
    --monmouth-text: #1c1d1f;
    --monmouth-gray: #5B6770;
    --monmouth-light-gray: #f7f7f7;
    --success-green: #28a745;
    --error-red: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--monmouth-text);
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    background: var(--monmouth-blue);
    color: #fff;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Crimson Text', serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* ==========================================================================
   Event Summary
   ========================================================================== */

.event-summary {
    background: var(--monmouth-light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--monmouth-orange);
}

.event-summary h3 {
    color: var(--monmouth-blue);
    margin-bottom: 0.5rem;
}

.event-summary p {
    margin: 0.25rem 0;
    color: var(--monmouth-gray);
}

/* ==========================================================================
   Survey Intro
   ========================================================================== */

.survey-intro {
    background: linear-gradient(135deg, rgba(0, 40, 85, 0.03) 0%, rgba(13, 100, 178, 0.03) 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--monmouth-light-blue);
}

.survey-intro p {
    margin-bottom: 0.5rem;
}

.survey-time {
    color: var(--monmouth-gray);
    font-size: 0.9rem;
}

.survey-time i {
    color: var(--monmouth-orange);
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-family: 'Crimson Text', serif;
    color: var(--monmouth-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--monmouth-text);
    margin-bottom: 0.5rem;
}

.required {
    color: var(--error-red);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--monmouth-light-blue);
    box-shadow: 0 0 0 3px rgba(13, 100, 178, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ==========================================================================
   Checkbox and Radio Groups
   ========================================================================== */

.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--monmouth-light-gray);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-label:hover,
.radio-label:hover {
    background: #e8e8e8;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ==========================================================================
   Star Rating
   ========================================================================== */

.rating-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--monmouth-light-gray);
    border-radius: 8px;
}

.rating-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.star-rating {
    display: flex;
    gap: 0.5rem;
    font-size: 2rem;
}

.star-rating i {
    cursor: pointer;
    color: #ddd;
    transition: all 0.2s;
}

.star-rating i:hover,
.star-rating i.hover {
    color: var(--monmouth-orange);
    transform: scale(1.2);
}

.star-rating i.fas {
    color: var(--monmouth-orange);
}

/* ==========================================================================
   Form Actions
   ========================================================================== */

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.btn-primary,
.btn-secondary {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--monmouth-orange);
    color: #fff;
}

.btn-primary:hover {
    background: #c96200;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 114, 0, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #fff;
    color: var(--monmouth-text);
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: var(--monmouth-light-gray);
    border-color: var(--monmouth-gray);
}

/* ==========================================================================
   Toast Messages
   ========================================================================== */

.success-toast,
.error-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    z-index: 20000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.success-toast {
    background: var(--success-green);
    color: #fff;
}

.error-toast {
    background: var(--error-red);
    color: #fff;
}

.success-toast.show,
.error-toast.show {
    display: flex;
}

.success-toast i,
.error-toast i {
    font-size: 1.5rem;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--monmouth-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .success-toast,
    .error-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}
