* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.volunteer-signup-container .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.volunteer-signup-container header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e62645;
}

.volunteer-signup-container h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.volunteer-signup-container .subtitle {
    color: #7f8c8d;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.volunteer-signup-container .pantry-info {
    background-color: #f8e8e8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 5px solid #e62645;
}

.volunteer-signup-container .pantry-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.volunteer-signup-container .pantry-info ul {
    padding-left: 20px;
}

.volunteer-signup-container .pantry-info li {
    margin-bottom: 8px;
}

.volunteer-signup-container .volunteer-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.volunteer-signup-container .volunteer-table thead {
    background-color: #e62645;
    color: white;
}

.volunteer-signup-container .volunteer-table th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.volunteer-signup-container .volunteer-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.volunteer-signup-container .volunteer-table tbody tr:hover {
    background-color: #f9f9f9;
}

.volunteer-signup-container .date-header {
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s;
}

.volunteer-signup-container .date-header:hover {
    background-color: #e9ecef;
}

.volunteer-signup-container .date-header td {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
    padding: 16px 15px;
}

.volunteer-signup-container .date-header .toggle-icon {
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.3s;
}

.volunteer-signup-container .date-header.expanded .toggle-icon {
    transform: rotate(90deg);
}

.volunteer-signup-container .expanded-content {
    background-color: #fcfdfe;
    border-top: 1px solid #eee;
}

.volunteer-signup-container .expanded-content td {
    padding: 0;
}

/* NEW CSS FOR THE TWO-COLUMN LAYOUT */
.volunteer-signup-container .details-container {
    padding: 20px;
}

.volunteer-signup-container .description-column {
    margin-bottom: 25px;
}

.volunteer-signup-container .description-column h4 {
    color: #e62645;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #eaeaea;
}

.volunteer-signup-container .two-columns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.volunteer-signup-container .two-columns-container .column {
    flex: 1;
    min-width: 300px;
}

.volunteer-signup-container .two-columns-container .column h4 {
    color: #e62645;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #eaeaea;
}

.volunteer-signup-container .volunteer-list {
    list-style-type: none;
}

.volunteer-signup-container .volunteer-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}

.volunteer-signup-container .volunteer-list li:last-child {
    border-bottom: none;
}

.volunteer-signup-container .volunteer-type {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 8px;
}

.volunteer-signup-container .volunteer-type.individual {
    background-color: #d4edda;
    color: #155724;
}

.volunteer-signup-container .volunteer-type.employer {
    background-color: #d1ecf1;
    color: #0c5460;
}

.volunteer-signup-container .volunteer-type.school {
    background-color: #fff3cd;
    color: #856404;
}

.volunteer-signup-container .filled-column {
    font-weight: bold;
}

.volunteer-signup-container .filled-column.full {
    color: #e62645;
}

.volunteer-signup-container .filled-column.available {
    color: #27ae60;
}

.volunteer-signup-container .signup-button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.volunteer-signup-container .signup-button:hover {
    background-color: #219653;
}

.volunteer-signup-container .signup-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.volunteer-signup-container .spots-reserved {
    font-weight: bold;
    color: #e62645;
}

.volunteer-signup-container .no-volunteers {
    color: #7f8c8d;
    font-style: italic;
}

.volunteer-signup-container .summary-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid #e62645;
}

.volunteer-signup-container .summary-box p {
    margin-bottom: 5px;
}

.volunteer-signup-container .summary-box strong {
    color: #2c3e50;
}

/* MODAL STYLES */
.volunteer-signup-container .modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.volunteer-signup-container .modal-overlay.active {
    display: flex;
}

.volunteer-signup-container .modal {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.volunteer-signup-container .modal-header {
    background-color: #e62645;
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.volunteer-signup-container .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.volunteer-signup-container .close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.volunteer-signup-container .close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.volunteer-signup-container .modal-body {
    padding: 25px;
}

.volunteer-signup-container .form-group {
    margin-bottom: 20px;
}

.volunteer-signup-container .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.volunteer-signup-container .form-group input,
.volunteer-signup-container .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.volunteer-signup-container .form-group input:focus,
.volunteer-signup-container .form-group select:focus {
    outline: none;
    border-color: #e62645;
}

.volunteer-signup-container .spots-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volunteer-signup-container .spots-selector button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.volunteer-signup-container .spots-selector button:hover:not(:disabled) {
    background-color: #e0e0e0;
}

.volunteer-signup-container .spots-selector button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.volunteer-signup-container .spots-selector input {
    width: 70px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.volunteer-signup-container .available-spots-info {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #666;
}

.volunteer-signup-container .available-spots-info.alert {
    color: #e62645;
    font-weight: 600;
}

.volunteer-signup-container .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.volunteer-signup-container .submit-btn {
    flex: 1;
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.volunteer-signup-container .submit-btn:hover {
    background-color: #219653;
}

.volunteer-signup-container .cancel-btn {
    flex: 1;
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.volunteer-signup-container .cancel-btn:hover {
    background-color: #7f8c8d;
}

/* UPDATED VOLUNTEER TYPE BUTTON STYLES */
.volunteer-signup-container .volunteer-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.volunteer-signup-container .volunteer-type-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e62645;
    background-color: #f6cfd6;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    color: #e62645;
}

.volunteer-signup-container .volunteer-type-btn:hover {
    background-color: #f0b6c1;
}

.volunteer-signup-container .volunteer-type-btn.active {
    background-color: #e62645;
    border-color: #f6cfd6;
    color: #f6cfd6;
}

.volunteer-signup-container .error-message {
    color: #e62645;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.volunteer-signup-container .error-message.show {
    display: block;
}

.volunteer-signup-container .success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    display: none;
}

.volunteer-signup-container .success-message.show {
    display: block;
}

/* Conditional field styling */
.volunteer-signup-container .conditional-field {
    display: none;
    animation: fadeIn 0.3s ease;
}

.volunteer-signup-container .conditional-field.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================================== */
/* NEW ADDITIONS START HERE */
/* =========================================== */

/* Add loading spinner */
.volunteer-signup-container .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e62645;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading overlay for modal */
.volunteer-signup-container .modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 10px;
}

.volunteer-signup-container .modal-loading.active {
    display: flex;
}

/* Validation styles */
.volunteer-signup-container .form-group.error input,
.volunteer-signup-container .form-group.error select {
    border-color: #e62645;
    background-color: #fdf2f3;
}

.volunteer-signup-container .form-group.success input,
.volunteer-signup-container .form-group.success select {
    border-color: #27ae60;
    background-color: #f3fcf6;
}

/* Accessibility improvements */
.volunteer-signup-container .signup-button:focus,
.volunteer-signup-container .close-modal:focus,
.volunteer-signup-container .volunteer-type-btn:focus,
.volunteer-signup-container .spots-selector button:focus {
    outline: 3px solid #2271b1;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .volunteer-signup-container .volunteer-table th {
        background-color: #000;
        color: #fff;
    }
    
    .volunteer-signup-container .signup-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .volunteer-signup-container .modal,
    .volunteer-signup-container .date-header,
    .volunteer-signup-container .signup-button,
    .volunteer-signup-container .modal-overlay {
        transition: none !important;
        animation: none !important;
    }
    
    .volunteer-signup-container .toggle-icon {
        transition: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .volunteer-signup-container {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .volunteer-signup-container .volunteer-table {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    .volunteer-signup-container .volunteer-table thead {
        background-color: #404040;
    }
    
    .volunteer-signup-container .volunteer-table tbody tr:hover {
        background-color: #3a3a3a;
    }
    
    .volunteer-signup-container .modal {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    .volunteer-signup-container .form-group input,
    .volunteer-signup-container .form-group select {
        background-color: #3a3a3a;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .volunteer-signup-container .pantry-info {
        background-color: #2a2a2a;
        color: #e0e0e0;
    }
    
    .volunteer-signup-container .summary-box {
        background-color: #2a2a2a;
        color: #e0e0e0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .volunteer-signup-container .volunteer-table {
        display: block;
        overflow-x: auto;
    }
    
    .volunteer-signup-container .two-columns-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .volunteer-signup-container .two-columns-container .column {
        min-width: 100%;
    }
    
    .volunteer-signup-container .volunteer-table th, 
    .volunteer-signup-container .volunteer-table td {
        min-width: 120px;
    }
    
    .volunteer-signup-container h1 {
        font-size: 2rem;
    }
    
    .volunteer-signup-container .modal {
        width: 95%;
        margin: 10px;
    }
    
    .volunteer-signup-container .form-actions {
        flex-direction: column;
    }
    
    .volunteer-signup-container .volunteer-type-selector {
        flex-direction: column;
    }
    
    /* Improved mobile table styling */
    .volunteer-signup-container .volunteer-table,
    .volunteer-signup-container .volunteer-table thead,
    .volunteer-signup-container .volunteer-table tbody,
    .volunteer-signup-container .volunteer-table th,
    .volunteer-signup-container .volunteer-table td,
    .volunteer-signup-container .volunteer-table tr {
        display: block;
    }
    
    .volunteer-signup-container .volunteer-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .volunteer-signup-container .volunteer-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .volunteer-signup-container .volunteer-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    
    .volunteer-signup-container .volunteer-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #2c3e50;
    }
    
    .volunteer-signup-container .date-header td {
        text-align: center;
        padding-left: 15px;
    }
    
    .volunteer-signup-container .date-header td:before {
        display: none;
    }
    
    /* Ensure expanded content displays properly */
    .volunteer-signup-container .expanded-content td {
        padding: 0;
    }
    
    .volunteer-signup-container .details-container {
        padding: 15px;
    }
}

/* Print styles */
@media print {
    .volunteer-signup-container .signup-button,
    .volunteer-signup-container .modal-overlay {
        display: none !important;
    }
    
    .volunteer-signup-container .volunteer-table {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .volunteer-signup-container .volunteer-table th {
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .volunteer-signup-container .volunteer-table tr {
        page-break-inside: avoid;
    }
}