/**
 * Dreampuzzle Bookings - Public Styles
 * Complete and optimized CSS for all components
 */

/* ===== CSS VARIABLES ===== */
:root {
    --dp-primary: #8e44ad;
    --dp-primary-dark: #7d3c98;
    --dp-primary-light: #161528;
    --dp-secondary: #3498db;
    --dp-success: #27ae60;
    --dp-warning: #f39c12;
    --dp-danger: #e74c3c;
    --dp-light: #f8f9fa;
    --dp-dark: #2c3e50;
    --dp-gray: #6c757d;
    --dp-border: #dee2e6;
    --dp-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --dp-shadow-lg: 0 5px 25px rgba(0,0,0,0.15);
    --dp-radius: 8px;
    --dp-radius-sm: 4px;
    --dp-radius-lg: 12px;
    --dp-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --dp-transition: all 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
.dp-calendar-container,
.dp-calendar-container *,
.dp-registration-container,
.dp-registration-container * {
    box-sizing: border-box;
}

.dp-calendar-container,
.dp-registration-container {
    font-family: var(--dp-font-family);
    line-height: 1.6;
    color: var(--dp-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== MAIN CONTAINERS ===== */
.dp-calendar-container {
    max-width: 100%;
    margin: 20px 0;
}

.dp-registration-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== CALENDAR FILTERS ===== */
.dp-calendar-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--dp-light);
    border-radius: var(--dp-radius);
    flex-wrap: wrap;
    border: 1px solid var(--dp-border);
    box-shadow: var(--dp-shadow);
}

.dp-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.dp-filter-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--dp-dark);
    margin-bottom: 0;
}

.dp-filter-group select,
.dp-filter-group input {
    padding: 10px 12px;
    border: 2px solid var(--dp-border);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dp-filter-group select:focus,
.dp-filter-group input:focus {
    outline: none;
    border-color: var(--dp-primary);
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.1);
}

.dp-filter-group select:hover,
.dp-filter-group input:hover {
    border-color: var(--dp-primary-light);
}

/* ===== CALENDAR COMPONENT ===== */
.dp-calendar {
    background: white;
    border-radius: var(--dp-radius);
    overflow: hidden;
    box-shadow: var(--dp-shadow);
    border: 1px solid var(--dp-border);
}

.dp-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, var(--dp-primary), var(--dp-primary-dark));
    color: white;
}

.dp-calendar-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-transform: capitalize;
}

.dp-calendar-nav {
    display: flex;
    gap: 10px;
}

.dp-calendar-nav button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--dp-radius-sm);
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: var(--dp-transition);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dp-calendar-nav button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.dp-calendar-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== CALENDAR GRID ===== */
.dp-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.dp-day-header {
    padding: 15px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    background: var(--dp-light);
    color: var(--dp-gray);
    border-bottom: 1px solid var(--dp-border);
}

.dp-calendar-day {
    min-height: 120px;
    padding: 10px;
    border-right: 1px solid var(--dp-border);
    border-bottom: 1px solid var(--dp-border);
    background: white;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.dp-calendar-day:nth-child(7n) {
    border-right: none;
}

.dp-calendar-day:hover {
    background: #fafbfc;
}

.dp-day-number {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--dp-dark);
    margin-bottom: 8px;
}

.dp-calendar-day.dp-other-month .dp-day-number {
    color: #ccc;
}

.dp-calendar-day.dp-today {
    background: rgba(142, 68, 173, 0.05);
}

.dp-calendar-day.dp-today .dp-day-number {
    background: var(--dp-primary);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* ===== LOADING STATES ===== */
.dp-loading {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--dp-radius);
    border: 1px solid var(--dp-border);
    box-shadow: var(--dp-shadow);
}

.dp-spinner {
    border: 4px solid var(--dp-light);
    border-top: 4px solid var(--dp-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: dp-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes dp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dp-loading p {
    margin: 0;
    color: var(--dp-gray);
    font-size: 16px;
}

/* ===== EVENT ITEMS ===== */
.dp-event-item {
    background: white;
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--dp-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.dp-event-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--dp-shadow-lg);
}

.dp-event-item:last-child {
    margin-bottom: 0;
}

.dp-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.dp-event-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dp-primary);
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.dp-event-type {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.dp-event-type.private {
    background: #e3f2fd;
    color: var(--dp-secondary);
}

.dp-event-type.school {
    background: #e8f5e8;
    color: var(--dp-success);
}

.dp-event-type.both {
    background: #f3e5f5;
    color: var(--dp-primary);
}

.dp-event-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.dp-event-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--dp-gray);
}

.dp-event-meta-item i,
.dp-event-meta-item::before {
    color: var(--dp-primary);
    font-size: 16px;
}

.dp-event-description {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 15px;
}

.dp-event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--dp-border);
    padding-top: 15px;
}

.dp-event-availability {
    font-size: 14px;
    font-weight: 600;
}

.dp-availability-full {
    color: var(--dp-danger);
}

.dp-availability-limited {
    color: var(--dp-warning);
}

.dp-availability-available {
    color: var(--dp-success);
}

/* ===== CALENDAR EVENT ITEMS (in calendar grid) ===== */
.dp-calendar-day .dp-event-item {
    background: var(--dp-primary);
    color: white;
    padding: 4px 6px;
    margin: 2px 0;
    border-radius: var(--dp-radius-sm);
    font-size: 11px;
    line-height: 1.2;
    border: none;
    box-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dp-calendar-day .dp-event-item:hover {
    background: var(--dp-primary-dark);
    transform: none;
    box-shadow: none;
}

.dp-calendar-day .dp-event-title {
    font-size: 11px;
    color: white;
    margin: 0;
    font-weight: 600;
}

/* Past events styling (calendar and list) */
.event-slot.past,
.month-event.past,
.list-event.past {
    opacity: 0.6;
    filter: grayscale(0.5);
}
.event-slot.past .booking-button,
.list-event.past .list-booking-button {
    display: none !important;
}

/* ===== MODALS ===== */
.dp-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dp-modal.dp-modal-open {
    opacity: 1;
    visibility: visible;
}

.dp-modal-content {
    background-color: white;
    border-radius: var(--dp-radius-lg);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.dp-modal.dp-modal-open .dp-modal-content {
    transform: scale(1);
}

.dp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--dp-border);
    background: var(--dp-light);
}

.dp-modal-header h3 {
    margin: 0;
    color: var(--dp-primary);
    font-size: 22px;
    font-weight: 700;
}

.dp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dp-gray);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--dp-transition);
}

.dp-modal-close:hover {
    background: #e9ecef;
    color: var(--dp-dark);
}

.dp-modal-body {
    padding: 30px;
}

.dp-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--dp-border);
    text-align: right;
    background: var(--dp-light);
}

/* ===== FORMS ===== */
.dp-form-group {
    margin-bottom: 25px;
}

.dp-form-group:last-child {
    margin-bottom: 0;
}

.dp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dp-dark);
    font-size: 14px;
}

.dp-form-group input,
.dp-form-group textarea,
.dp-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--dp-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.dp-form-group input:focus,
.dp-form-group textarea:focus,
.dp-form-group select:focus {
    outline: none;
    border-color: var(--dp-primary);
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.1);
}

.dp-form-group input:hover,
.dp-form-group textarea:hover,
.dp-form-group select:hover {
    border-color: var(--dp-primary-light);
}

.dp-form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.dp-form-group.dp-required label::after {
    content: " *";
    color: var(--dp-danger);
    font-weight: 700;
}

.dp-field-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--dp-gray);
    font-style: italic;
    line-height: 1.4;
}

/* ===== FORM ROWS ===== */
.dp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dp-form-row .dp-form-group {
    margin-bottom: 0;
}

/* ===== PARTICIPANTS SECTION ===== */
.dp-participants-container {
    border: 2px solid var(--dp-border);
    border-radius: var(--dp-radius);
    overflow: hidden;
    background: white;
}

.dp-participant {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid var(--dp-border);
    background: white;
    transition: background-color 0.3s ease;
}

.dp-participant:last-child {
    border-bottom: none;
}

.dp-participant:hover {
    background: #fafbfc;
}

.dp-participant-number {
    font-weight: 700;
    color: var(--dp-primary);
    font-size: 16px;
    min-width: 30px;
    text-align: center;
}

.dp-participant-fields {
    display: flex;
    gap: 15px;
    flex: 1;
}

.dp-participant-fields input {
    flex: 1;
    margin: 0;
}

.dp-participant-fields input:first-child {
    flex: 2;
}

.dp-participant-fields input:last-child {
    flex: 1;
    max-width: 100px;
}

/* ===== BUTTONS ===== */
.dp-button {
    padding: 12px 24px;
    border: 2px solid var(--dp-border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    transition: var(--dp-transition);
    font-family: inherit;
    color: var(--dp-dark);
    line-height: 1;
}

.dp-button:hover:not(:disabled) {
    background: var(--dp-light);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--dp-dark);
}

.dp-button:active {
    transform: translateY(0);
}

.dp-button-primary {
    background: var(--dp-primary);
    color: white;
    border-color: var(--dp-primary);
}

.dp-button-primary:hover:not(:disabled) {
    background: var(--dp-primary-dark);
    border-color: var(--dp-primary-dark);
    color: white;
}

.dp-button-secondary {
    background: var(--dp-secondary);
    color: white;
    border-color: var(--dp-secondary);
}

.dp-button-secondary:hover:not(:disabled) {
    background: #2980b9;
    border-color: #2980b9;
    color: white;
}

.dp-button-success {
    background: var(--dp-success);
    color: white;
    border-color: var(--dp-success);
}

.dp-button-success:hover:not(:disabled) {
    background: #219a52;
    border-color: #219a52;
    color: white;
}

.dp-button-warning {
    background: var(--dp-warning);
    color: white;
    border-color: var(--dp-warning);
}

.dp-button-warning:hover:not(:disabled) {
    background: #e67e22;
    border-color: #e67e22;
    color: white;
}

.dp-button-danger {
    background: var(--dp-danger);
    color: white;
    border-color: var(--dp-danger);
}

.dp-button-danger:hover:not(:disabled) {
    background: #c0392b;
    border-color: #c0392b;
    color: white;
}

.dp-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.dp-button-small {
    padding: 8px 16px;
    font-size: 12px;
}

.dp-button-large {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
}

.dp-remove-participant {
    background: var(--dp-danger);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--dp-radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--dp-transition);
    white-space: nowrap;
}

.dp-remove-participant:hover {
    background: #c0392b;
}

/* ===== NOTICES ===== */
.dp-notice {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: var(--dp-radius);
    border-left: 4px solid;
    font-weight: 500;
    line-height: 1.5;
}

.dp-notice p {
    margin: 0;
}

.dp-notice a {
    font-weight: 600;
    text-decoration: underline;
}

.dp-notice-success {
    background: #d4edda;
    border-color: var(--dp-success);
    color: #155724;
}

.dp-notice-success a {
    color: #0d4015;
}

.dp-notice-error {
    background: #f8d7da;
    border-color: var(--dp-danger);
    color: #721c24;
}

.dp-notice-error a {
    color: #491217;
}

.dp-notice-warning {
    background: #fff3cd;
    border-color: var(--dp-warning);
    color: #856404;
}

.dp-notice-warning a {
    color: #533f03;
}

.dp-notice-info {
    background: #d1ecf1;
    border-color: var(--dp-secondary);
    color: #0c5460;
}

.dp-notice-info a {
    color: #062c33;
}

/* ===== LOGIN NOTICE ===== */
.dp-login-notice {
    text-align: center;
    padding: 30px;
    background: var(--dp-light);
    border-radius: var(--dp-radius);
    margin-top: 20px;
    border: 2px dashed var(--dp-border);
}

.dp-login-notice p {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--dp-dark);
}

.dp-login-notice .dp-button {
    margin: 0 10px 10px 0;
}

/* ===== REGISTRATION FORM SPECIFIC ===== */
.dp-registration-form {
    background: white;
    border-radius: var(--dp-radius-lg);
    box-shadow: var(--dp-shadow-lg);
    overflow: hidden;
    border: 1px solid var(--dp-border);
}

.dp-form-header {
    text-align: center;
    margin-bottom: 0;
    padding: 40px 30px 30px;
    background: linear-gradient(135deg, var(--dp-primary), var(--dp-primary-dark));
    color: white;
}

.dp-form-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
    color: white;
}

.dp-form-header p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.dp-form-section {
    padding: 30px;
    border-bottom: 1px solid var(--dp-border);
}

.dp-form-section:last-child {
    border-bottom: none;
}

.dp-form-section h3 {
    margin: 0 0 25px 0;
    color: var(--dp-primary);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dp-form-section h3::before {
    content: "";
    width: 4px;
    height: 24px;
    background: var(--dp-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ===== USER TYPE TOGGLE ===== */
.dp-user-type-toggle {
    display: flex;
    background: var(--dp-light);
    border-radius: 10px;
    padding: 6px;
    margin-bottom: 25px;
    border: 2px solid var(--dp-border);
}

.dp-user-type-option {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: var(--dp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--dp-gray);
}

.dp-user-type-option:hover {
    background: rgba(142, 68, 173, 0.1);
    color: var(--dp-primary);
}

.dp-user-type-option.active {
    background: var(--dp-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(142, 68, 173, 0.3);
    transform: translateY(-1px);
}

/* ===== CHECKBOX GROUPS ===== */
.dp-checkbox-group {
    background: var(--dp-light);
    padding: 15px;
    border-radius: var(--dp-radius);
    margin-bottom: 15px;
    border-left: 4px solid var(--dp-primary);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dp-checkbox-group:last-child {
    margin-bottom: 0;
}

.dp-checkbox-group input[type="checkbox"] {
    transform: scale(1.2);
    margin: 0;
    width: auto;
    flex-shrink: 0;
    accent-color: var(--dp-primary);
    margin-top: 2px;
}

.dp-checkbox-group label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
    line-height: 1.5;
    flex: 1;
}

.dp-checkbox-group a {
    color: var(--dp-primary);
    font-weight: 600;
    text-decoration: none;
}

.dp-checkbox-group a:hover {
    text-decoration: underline;
}

/* ===== FORM ACTIONS ===== */
.dp-form-actions {
    text-align: center;
    padding: 30px;
    background: var(--dp-light);
}

.dp-form-footer {
    text-align: center;
    padding: 20px 30px;
    border-top: 1px solid var(--dp-border);
    background: white;
}

.dp-form-footer p {
    margin: 0;
    color: var(--dp-gray);
}

.dp-form-footer a {
    color: var(--dp-primary);
    text-decoration: none;
    font-weight: 600;
}

/* ===== USER BOOKINGS COMPONENT ===== */
.dp-user-bookings {
    max-width: 900px;
    margin: 20px auto;
    padding: 0;
    font-family: var(--dp-font-family);
}

.dp-user-bookings .dp-title {
    color: #161528;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.dp-user-bookings .dp-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #54529e;
    border-radius: 2px;
}

.dp-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--dp-radius-lg);
    border: 2px dashed var(--dp-border);
    margin: 20px 0;
    box-shadow: var(--dp-shadow);
}

.dp-empty-state p {
    font-size: 18px;
    color: #495057;
    margin: 0;
    font-weight: 500;
}

.dp-empty-state::before {
    content: "📋";
    font-size: 48px;
    display: block;
    margin-bottom: 20px;
    opacity: 0.7;
}

.dp-bookings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.dp-booking-row {
    background: white;
    border-radius: var(--dp-radius-lg);
    padding: 25px;
    box-shadow: var(--dp-shadow);
    border: 1px solid var(--dp-border);
    transition: var(--dp-transition);
    position: relative;
    overflow: hidden;
}

.dp-booking-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: #161528;
    opacity: 0.8;
}

.dp-booking-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--dp-shadow-lg);
}

.dp-booking-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.dp-booking-content {
    flex: 1;
}

.dp-event-title {
    font-size: 20px;
    font-weight: 700;
    color: #161528;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.dp-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #495057;
}

.dp-event-meta .dp-when {
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dp-event-meta .dp-when::before {
    content: "🕐";
    font-size: 16px;
}

.dp-event-meta .dp-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #495057;
    font-weight: 500;
}

.dp-event-meta .dp-location::before {
    content: "📍";
    font-size: 14px;
}

.dp-participants {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: var(--dp-radius);
    border-left: 4px solid var(--dp-secondary);
    border: 1px solid #e9ecef;
}

.dp-participants strong {
    color: #2c3e50;
    font-weight: 600;
}

.dp-participants span {
    color: #495057;
    font-weight: 500;
}

.dp-participants::before {
    content: "👥";
    font-size: 16px;
    margin-right: 5px;
}

.dp-status {
    display: flex;
    justify-content: flex-end;
}

.dp-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dp-badge::before {
    font-size: 14px;
}

.dp-status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.dp-status-pending::before {
    content: "⏳";
}

.dp-status-confirmed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dp-status-confirmed::before {
    content: "✅";
}

.dp-status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dp-status-cancelled::before {
    content: "❌";
}

.dp-status-completed {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.dp-status-completed::before {
    content: "🏁";
}

.dp-booking-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--dp-border);
    justify-content: flex-end;
}

.dp-cancel-booking {
    background: var(--dp-danger);
    color: white;
    border: 2px solid var(--dp-danger);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--dp-transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-family: inherit;
}

.dp-cancel-booking::before {
    content: "🗑️";
    font-size: 12px;
}

.dp-cancel-booking:hover:not(:disabled) {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.3);
    color: white;
    text-decoration: none;
}

.dp-cancel-booking:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dp-actions-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--dp-radius);
    border: 1px solid #e9ecef;
}

#dp-refresh-bookings {
    background: var(--dp-secondary);
    color: white;
    border: 2px solid var(--dp-secondary);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--dp-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

#dp-refresh-bookings::before {
    content: "🔄";
    font-size: 14px;
}

#dp-refresh-bookings:hover {
    background: #2980b9;
    border-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3);
    color: white;
    text-decoration: none;
}

/* ===== BOOKING MANAGEMENT MODALS ===== */
.dp-booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dp-booking-modal.dp-show {
    display: flex;
    opacity: 1;
}

.dp-booking-modal-content {
    background: white;
    border-radius: var(--dp-radius-lg);
    max-width: 600px; /* Increased from 500px to accommodate three fields */
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.dp-booking-modal.dp-show .dp-booking-modal-content {
    transform: scale(1);
}

.dp-booking-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, var(--dp-primary), var(--dp-primary-dark));
    color: white;
    border-radius: var(--dp-radius-lg) var(--dp-radius-lg) 0 0;
}

.dp-booking-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dp-booking-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--dp-transition);
}

.dp-booking-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.dp-booking-modal-body {
    padding: 30px;
}

.dp-booking-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 var(--dp-radius-lg) var(--dp-radius-lg);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Cancel Modal Specific */
.dp-cancel-modal .dp-booking-modal-header {
    background: linear-gradient(135deg, var(--dp-danger), #c0392b);
}

.dp-cancel-modal h3::before {
    content: "🗑️";
    font-size: 18px;
}

.dp-cancel-reasons {
    margin-bottom: 20px;
}

.dp-cancel-reasons label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 15px;
}

.dp-reason-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.dp-reason-select:focus {
    outline: none;
    border-color: var(--dp-danger);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.dp-reason-details {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.dp-reason-details:focus {
    outline: none;
    border-color: var(--dp-danger);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.dp-reason-details::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Edit Modal Specific */
.dp-edit-modal .dp-booking-modal-header {
    background: linear-gradient(135deg, var(--dp-secondary), #2980b9);
}

.dp-edit-modal h3::before {
    content: "✏️";
    font-size: 18px;
}

.dp-edit-form-group {
    margin-bottom: 20px;
}

.dp-edit-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
}

.dp-edit-form-group input,
.dp-edit-form-group textarea,
.dp-edit-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border-color 0.3s ease;
}

.dp-edit-form-group input:focus,
.dp-edit-form-group textarea:focus,
.dp-edit-form-group select:focus {
    outline: none;
    border-color: var(--dp-secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.dp-participants-editor {
    border: 2px solid #e9ecef;
    border-radius: var(--dp-radius);
    overflow: hidden;
    background: white;
    width: 100%;
    box-sizing: border-box;
}

.dp-participant-edit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    background: white;
    min-width: 0; /* Prevents flex shrinking issues */
    width: 100%;
    box-sizing: border-box;
}

/* Ensure proper spacing and no overlap for participant fields */
@media (min-width: 769px) {
    .dp-participant-edit {
        padding: 15px 20px; /* More horizontal padding for better spacing */
        gap: 15px; /* Increased gap between elements */
    }
}

.dp-participant-edit:last-child {
    border-bottom: none;
}

.dp-participant-edit:hover {
    background: #f8f9fa;
}

.dp-participant-number-edit {
    font-weight: 700;
    color: var(--dp-secondary);
    font-size: 14px;
    min-width: 30px;
    width: 30px;
    text-align: center;
    flex-shrink: 0; /* Prevents shrinking */
}

.dp-participant-inputs {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 0; /* Prevents flex items from shrinking below content size */
}

.dp-participant-inputs input {
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    transition: border-color 0.3s ease;
    min-width: 0; /* Important for proper flex behavior */
}

.dp-participant-inputs input:focus {
    outline: none;
    border-color: var(--dp-secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Nome input */
.dp-participant-inputs input.dp-participant-nome {
    flex: 2;
    min-width: 100px;
}

/* Cognome input */
.dp-participant-inputs input.dp-participant-cognome {
    flex: 2;
    min-width: 100px;
}

/* Età input */
.dp-participant-inputs input.dp-participant-age {
    flex: 1;
    min-width: 60px;
    max-width: 80px;
}

/* Fallback for legacy single name field */
.dp-participant-inputs input.dp-participant-name {
    flex: 3;
    min-width: 120px;
}

.dp-remove-participant-edit {
    background: var(--dp-danger);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--dp-transition);
    white-space: nowrap;
    flex-shrink: 0; /* Prevents shrinking */
    min-width: 70px; /* Ensures minimum width */
}

.dp-remove-participant-edit:hover {
    background: #c0392b;
}

.dp-add-participant-edit {
    background: var(--dp-success);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--dp-transition);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
}

.dp-add-participant-edit::before {
    content: "➕";
    font-size: 12px;
}

.dp-add-participant-edit:hover {
    background: #219a52;
    transform: translateY(-1px);
}

/* Modal Buttons */
.dp-modal-btn {
    padding: 10px 20px;
    border: 2px solid;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--dp-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
    min-width: 120px;
    justify-content: center;
}

.dp-modal-btn:focus {
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dp-modal-btn-primary {
    background: var(--dp-primary);
    color: white;
    border-color: var(--dp-primary);
}

.dp-modal-btn-primary:hover:not(:disabled) {
    background: var(--dp-primary-dark);
    border-color: var(--dp-primary-dark);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.dp-modal-btn-secondary {
    background: var(--dp-secondary);
    color: white;
    border-color: var(--dp-secondary);
}

.dp-modal-btn-secondary:hover:not(:disabled) {
    background: #2980b9;
    border-color: #2980b9;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.dp-modal-btn-danger {
    background: var(--dp-danger);
    color: white;
    border-color: var(--dp-danger);
}

.dp-modal-btn-danger:hover:not(:disabled) {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.dp-modal-btn-light {
    background: white;
    color: #495057;
    border-color: #e9ecef;
}

.dp-modal-btn-light:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-1px);
    color: #495057;
    text-decoration: none;
}

.dp-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.dp-modal-btn::before {
    font-size: 14px;
}

.dp-modal-btn-primary::before {
    content: "✓";
}

.dp-modal-btn-danger::before {
    content: "🗑️";
}

.dp-modal-btn-light::before {
    content: "✕";
}

.dp-modal-btn-secondary::before {
    content: "💾";
}

/* Booking Info Display */
.dp-booking-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--dp-radius);
    margin-bottom: 25px;
    border-left: 4px solid var(--dp-primary);
}

.dp-booking-info h4 {
    margin: 0 0 10px 0;
    color: var(--dp-primary);
    font-size: 16px;
    font-weight: 700;
}

.dp-booking-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #495057;
}

.dp-booking-info strong {
    color: #2c3e50;
}

/* Loading states for modals */
.dp-modal-loading {
    text-align: center;
    padding: 40px 20px;
}

.dp-modal-loading .dp-spinner {
    margin: 0 auto 15px;
}

.dp-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--dp-primary);
    border-radius: 50%;
    animation: dp-spin 1s linear infinite;
    display: inline-block;
}

@keyframes dp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Warning messages */
.dp-warning-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

.dp-warning-message::before {
    content: "⚠️ ";
    font-size: 16px;
    margin-right: 5px;
}

/* Responsive design for modals */
@media (max-width: 768px) {
    .dp-booking-modal {
        padding: 10px;
    }
    
    .dp-booking-modal-content {
        max-width: 100%;
        margin: 0;
    }
    
    .dp-booking-modal-header,
    .dp-booking-modal-body,
    .dp-booking-modal-footer {
        padding: 20px 15px;
    }
    
    .dp-booking-modal-footer {
        flex-direction: column;
    }
    
    .dp-modal-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .dp-modal-btn:last-child {
        margin-bottom: 0;
    }
    
    .dp-participant-edit {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }
    
    .dp-participant-inputs {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        min-width: 0;
    }
    
    .dp-participant-inputs input {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: none !important;
        box-sizing: border-box;
    }
    
    .dp-participant-number-edit {
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }
    
    .dp-remove-participant-edit {
        width: 100%;
        margin-top: 5px;
    }
}

/* Additional safety rules to prevent layout issues */
.dp-participant-edit * {
    box-sizing: border-box;
}

.dp-participant-inputs input {
    /* Force stable sizing */
    flex-basis: auto !important;
    min-height: 38px;
    font-size: 14px !important;
}

/* Prevent any external CSS from interfering */
.dp-booking-modal .dp-participant-inputs input {
    all: revert;
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    transition: border-color 0.3s ease;
    min-width: 0;
    box-sizing: border-box;
}

.dp-booking-modal .dp-participant-inputs input.dp-participant-nome {
    flex: 2;
    min-width: 100px;
}

.dp-booking-modal .dp-participant-inputs input.dp-participant-cognome {
    flex: 2;
    min-width: 100px;
}

.dp-booking-modal .dp-participant-inputs input.dp-participant-age {
    flex: 1;
    min-width: 60px;
    max-width: 80px;
}

/* Legacy fallback */
.dp-booking-modal .dp-participant-inputs input.dp-participant-name {
    flex: 3;
    min-width: 120px;
}
@media (max-width: 768px) {
    .dp-booking-modal {
        padding: 10px;
    }
    
    .dp-booking-modal-content {
        max-width: 100%;
        margin: 0;
    }
    
    .dp-booking-modal-header,
    .dp-booking-modal-body,
    .dp-booking-modal-footer {
        padding: 20px 15px;
    }
    
    .dp-booking-modal-footer {
        flex-direction: column;
    }
    
    .dp-modal-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .dp-participant-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .dp-participant-inputs input {
        width: 100% !important;
        max-width: none !important;
    }
}

/* Email cancellation minimal modal styling */
#dp-cancel-modal.dp-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; z-index: 9999; }
#dp-cancel-modal .dp-modal-content { background: #fff; width: 92%; max-width: 520px; margin: 10vh auto; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
#dp-cancel-modal .dp-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eee; }
#dp-cancel-modal .dp-modal-body { padding: 16px; }
#dp-cancel-modal .dp-modal-close { background: transparent; border: 0; font-size: 20px; line-height: 1; cursor: pointer; }
#dp-cancel-modal select, #dp-cancel-modal textarea { width: 100%; box-sizing: border-box; }

.dp-form-footer a:hover {
    text-decoration: underline;
}

/* ===== PASSWORD STRENGTH INDICATOR ===== */
.dp-password-strength {
    margin-top: 8px;
}

.dp-strength-bar {
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.dp-strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.dp-strength-fill.very-weak {
    background: var(--dp-danger);
}

.dp-strength-fill.weak {
    background: #fd7e14;
}

.dp-strength-fill.medium {
    background: var(--dp-warning);
}

.dp-strength-fill.strong {
    background: var(--dp-success);
}

.dp-strength-text {
    font-size: 12px;
    font-weight: 600;
}

.dp-strength-text.very-weak {
    color: var(--dp-danger);
}

.dp-strength-text.weak {
    color: #fd7e14;
}

.dp-strength-text.medium {
    color: var(--dp-warning);
}

.dp-strength-text.strong {
    color: var(--dp-success);
}

/* ===== ICONS (Simple text-based icons) ===== */
.dp-icon-user::before { content: "👤 "; }
.dp-icon-school::before { content: "🏫 "; }
.dp-icon-user-plus::before { content: "➕ "; }
.dp-icon-loading::before { 
    content: "⟳ ";
    animation: dp-spin 1s linear infinite;
}
.dp-icon-calendar::before { content: "📅 "; }
.dp-icon-clock::before { content: "🕐 "; }
.dp-icon-location::before { content: "📍 "; }
.dp-icon-users::before { content: "👥 "; }
.dp-icon-time::before { content: "⏰ "; }
.dp-icon-email::before { content: "✉️ "; }
.dp-icon-phone::before { content: "📞 "; }
.dp-icon-check::before { content: "✓ "; }
.dp-icon-close::before { content: "✕ "; }
.dp-icon-edit::before { content: "✏️ "; }
.dp-icon-delete::before { content: "🗑️ "; }
.dp-icon-settings::before { content: "⚙️ "; }
.dp-icon-info::before { content: "ℹ️ "; }
.dp-icon-warning::before { content: "⚠️ "; }
.dp-icon-success::before { content: "✅ "; }
.dp-icon-error::before { content: "❌ "; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .dp-calendar-container {
        margin: 10px 0;
    }
    
    .dp-calendar-filters {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .dp-filter-group {
        min-width: 100%;
    }
    
    .dp-calendar-header {
        padding: 20px 15px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .dp-calendar-title {
        font-size: 20px;
    }
    
    .dp-calendar-days {
        font-size: 14px;
    }
    
    .dp-calendar-day {
        min-height: 80px;
        padding: 8px;
    }
    
    .dp-day-header {
        padding: 10px 5px;
        font-size: 10px;
    }
    
    .dp-event-item {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .dp-event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dp-event-title {
        font-size: 16px;
    }
    
    .dp-event-meta {
        gap: 15px;
    }
    
    .dp-event-meta-item {
        font-size: 13px;
    }
    
    .dp-event-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dp-modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .dp-modal-header {
        padding: 20px 15px;
    }
    
    .dp-modal-body {
        padding: 20px 15px;
    }
    
    .dp-modal-footer {
        padding: 15px;
    }
    
    .dp-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .dp-form-row .dp-form-group {
        margin-bottom: 20px;
    }
    
    .dp-participant-fields {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Modal participants responsive */
    .dp-booking-modal {
        padding: 10px;
    }
    
    .dp-booking-modal-content {
        max-width: 100%;
        margin: 0;
    }
    
    .dp-booking-modal-header,
    .dp-booking-modal-body,
    .dp-booking-modal-footer {
        padding: 20px 15px;
    }
    
    .dp-booking-modal-footer {
        flex-direction: column;
    }
    
    .dp-modal-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .dp-modal-btn:last-child {
        margin-bottom: 0;
    }
    
    .dp-participant-edit {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }
    
    .dp-participant-inputs {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        min-width: 0;
    }
    
    .dp-participant-inputs input {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: none !important;
        box-sizing: border-box;
    }
    
    .dp-participant-number-edit {
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }
    
    .dp-remove-participant-edit {
        width: 100%;
        margin-top: 5px;
    }
    
    .dp-participant-fields input {
        max-width: 100%;
    }
    
    .dp-user-type-toggle {
        flex-direction: column;
        gap: 5px;
    }
    
    .dp-user-type-option {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .dp-registration-container {
        padding: 10px;
    }
    
    .dp-form-header {
        padding: 30px 20px 20px;
    }
    
    .dp-form-header h2 {
        font-size: 24px;
    }
    
    .dp-form-section {
        padding: 20px 15px;
    }
    
    .dp-form-actions {
        padding: 20px 15px;
    }
    
    .dp-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .dp-button-large {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .dp-calendar-day .dp-event-item {
        font-size: 10px;
        padding: 3px 5px;
    }
    
    .dp-calendar-day .dp-event-title {
        font-size: 10px;
    }

    /* User Bookings Mobile Styles */
    .dp-user-bookings {
        margin: 10px;
        padding: 0 10px;
    }
    
    .dp-user-bookings .dp-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .dp-booking-row {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .dp-booking-main {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .dp-event-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .dp-event-meta {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .dp-participants {
        padding: 10px 12px;
        margin-bottom: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .dp-status {
        justify-content: flex-start;
    }
    
    .dp-booking-actions {
        padding-top: 12px;
        justify-content: center;
    }
    
    .dp-cancel-booking {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 14px;
    }
    
    .dp-actions-bar {
        padding: 15px;
        flex-direction: column;
    }
    
    #dp-refresh-bookings {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .dp-empty-state {
        padding: 40px 15px;
        margin: 15px 0;
    }
    
    .dp-empty-state p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .dp-calendar-filters {
        padding: 10px;
    }
    
    .dp-calendar-header {
        padding: 15px 10px;
    }
    
    .dp-calendar-title {
        font-size: 18px;
    }
    
    .dp-calendar-nav button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .dp-calendar-day {
        min-height: 60px;
        padding: 5px;
    }
    
    .dp-day-header {
        padding: 8px 3px;
        font-size: 9px;
    }
    
    .dp-event-item {
        padding: 12px;
    }
    
    .dp-event-title {
        font-size: 15px;
    }
    
    .dp-event-meta-item {
        font-size: 12px;
    }
    
    .dp-form-header h2 {
        font-size: 20px;
    }
    
    .dp-form-section h3 {
        font-size: 18px;
    }
    
    .dp-participant-number {
        font-size: 14px;
        min-width: 25px;
    }
    
    .dp-remove-participant {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .dp-checkbox-group {
        padding: 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .dp-checkbox-group input[type="checkbox"] {
        align-self: flex-start;
        margin-top: 0;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .dp-calendar-filters,
    .dp-calendar-nav,
    .dp-modal,
    .dp-button,
    .dp-form-actions,
    .dp-form-footer,
    .dp-remove-participant {
        display: none !important;
    }
    
    .dp-calendar-container,
    .dp-registration-container {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .dp-calendar,
    .dp-event-item,
    .dp-registration-form {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .dp-calendar-header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
    
    .dp-event-item {
        break-inside: avoid;
        margin-bottom: 15px;
    }
    
    .dp-form-header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.dp-calendar-day:focus,
.dp-event-item:focus,
.dp-button:focus,
.dp-user-type-option:focus {
    outline: 3px solid var(--dp-primary);
    outline-offset: 2px;
}

.dp-calendar-day:focus-visible,
.dp-event-item:focus-visible,
.dp-button:focus-visible,
.dp-user-type-option:focus-visible {
    outline: 3px solid var(--dp-primary);
    outline-offset: 2px;
}

/* Screen reader only content */
.dp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --dp-primary: #000080;
        --dp-primary-dark: #000060;
        --dp-border: #000;
        --dp-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .dp-calendar-day,
    .dp-event-item,
    .dp-form-group input,
    .dp-form-group textarea,
    .dp-form-group select {
        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;
    }
    
    .dp-spinner {
        animation: none;
    }
    
    .dp-icon-loading::before {
        animation: none;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --dp-primary: #a569bd;
        --dp-primary-dark: #8e44ad;
        --dp-primary-light: #bb8fc9;
        --dp-light: #2c3e50;
        --dp-dark: #ecf0f1;
        --dp-border: #34495e;
        --dp-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .dp-calendar,
    .dp-event-item,
    .dp-registration-form,
    .dp-modal-content {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .dp-calendar-day {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .dp-calendar-day:hover {
        background: #3a526b;
    }
    
    .dp-form-group input,
    .dp-form-group textarea,
    .dp-form-group select {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #4a6741;
    }
    
    .dp-button {
        background: #34495e;
        color: #ecf0f1;
        border-color: #4a6741;
    }
    
    .dp-button:hover:not(:disabled) {
        background: #3a526b;
    }
}

/* ===== UTILITY CLASSES ===== */
.dp-text-center { text-align: center; }
.dp-text-left { text-align: left; }
.dp-text-right { text-align: right; }
.dp-font-bold { font-weight: 700; }
.dp-font-normal { font-weight: 400; }
.dp-hidden { display: none !important; }
.dp-visible { display: block !important; }
.dp-margin-0 { margin: 0 !important; }
.dp-padding-0 { padding: 0 !important; }
.dp-margin-bottom-0 { margin-bottom: 0 !important; }
.dp-margin-top-20 { margin-top: 20px !important; }
.dp-margin-bottom-20 { margin-bottom: 20px !important; }

/* ===== ANIMATION KEYFRAMES ===== */
@keyframes dp-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes dp-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== BUTTON STYLES ===== */
.dp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    white-space: nowrap;
    gap: 6px;
}

.dp-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.dp-btn-secondary {
    background: var(--dp-secondary);
    color: white;
    border-color: var(--dp-secondary);
}

.dp-btn-secondary:hover {
    background: #2980b9;
    border-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.dp-btn-danger {
    background: var(--dp-danger);
    color: white;
    border-color: var(--dp-danger);
}

.dp-btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* Fix for separate Nome/Cognome/Età fields to prevent overlap with Rimuovi button */
@media (min-width: 769px) {
    .dp-participant-inputs {
        display: flex;
        gap: 12px;
        flex: 1;
        min-width: 0;
        margin-right: 20px; /* Increased space for Rimuovi button */
    }
    
    .dp-participant-inputs input.dp-participant-nome {
        flex: 2.5;
        min-width: 100px;
        max-width: none;
    }
    
    .dp-participant-inputs input.dp-participant-cognome {
        flex: 2.5;
        min-width: 100px;
        max-width: none;
    }
    
    .dp-participant-inputs input.dp-participant-age {
        flex: 1;
        min-width: 60px;
        max-width: 65px; /* Reduced from 80px to 65px */
        margin-right: 10px; /* Extra margin to ensure separation */
    }
    
    /* Ensure remove button has enough space and doesn't overlap */
    .dp-remove-participant-edit {
        flex-shrink: 0;
        min-width: 80px;
        margin-left: 10px;
    }
}

/* Mobile responsive for new fields */
@media (max-width: 768px) {
    .dp-participant-inputs input.dp-participant-nome,
    .dp-participant-inputs input.dp-participant-cognome,
    .dp-participant-inputs input.dp-participant-age {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: none !important;
        margin-bottom: 8px;
    }
}

@keyframes dp-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.dp-fade-in {
    animation: dp-fadeIn 0.3s ease-out;
}

.dp-slide-up {
    animation: dp-slideUp 0.4s ease-out;
}

.dp-pulse {
    animation: dp-pulse 1.5s ease-in-out infinite;
}