/* Reset e stili base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .logo h1 {
    font-size: 1.8rem;
}

header .logo a {
    color: white;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-section {
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 0.8rem;
    color: #3498db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
}

.footer-section ul li a:hover {
    text-decoration: underline;
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #34495e;
    margin-top: 1rem;
}

/* Bottoni */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-success {
    background-color: #27ae60;
}

.btn-success:hover {
    background-color: #219653;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-cancel {
    background-color: #95a5a6;
}

.btn-cancel:hover {
    background-color: #7f8c8d;
}

.btn-pagopa {
    background-color: #0066cc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-pagopa img {
    height: 20px;
}

/* Form */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

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

.form-help {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.3rem;
}

/* Alert */
.alert {
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Sezioni */
.hero {
    background-color: #3498db;
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.feature i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.8rem;
}

/* Calendario prenotazioni */
.booking-section {
    margin: 2rem 0;
}

.booking-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.calendar-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    overflow-x: auto;
}

.spots-column {
    display: grid;
    grid-template-rows: auto;
}

.spot-header {
    font-weight: bold;
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.spot-row {
    padding: 0rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
}

.dates-container {
    display: grid;
    grid-template-rows: auto;
    overflow-x: auto;
}

.date-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(50px, 1fr);
}

.date-cell {
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.date-cell:hover {
    background-color: #f8f9fa;
}

.date-cell.booked {
    background-color: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
}

.date-cell.blocked {
    background-color: #fff3cd;
    color: #856404;
    cursor: not-allowed;
}

.date-cell.past {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.date-cell.selected {
    background-color: #d4edda;
    color: #155724;
    font-weight: bold;
}

.date-cell.empty {
    background-color: #f8f9fa;
    cursor: default;
}

/* Form prenotazione */
.booking-form-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.booking-instructions {
    padding: 1rem;
}

.booking-instructions ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Pagamento */
.payment-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.total-amount {
    font-size: 1.2em;
    color: #2c3e50;
    font-weight: bold;
    margin-top: 10px;
}

.payment-section {
    margin: 2rem 0;
}

.payment-details, .payment-methods {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.payment-details h3, .payment-methods h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* Conferma */
.confirmation-section {
    margin: 2rem 0;
}

.confirmation-box {
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.confirmation-header {
    text-align: center;
    margin-bottom: 2rem;
}

.confirmation-header i {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.confirmation-details {
    margin-bottom: 2rem;
}

.confirmation-details p {
    margin-bottom: 0.8rem;
}

.gate-code {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.confirmation-message {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.confirmation-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-print {
    background-color: #6c757d;
}

.btn-print:hover {
    background-color: #5a6268;
}

/* Privacy */
.privacy-section {
    margin: 2rem 0;
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.privacy-section h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.privacy-section article {
    margin-bottom: 2rem;
}

.privacy-section article h3 {
    margin-bottom: 0.8rem;
    color: #2c3e50;
}

/* Admin */
.admin-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-container {
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.admin-dashboard {
    margin: 2rem 0;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    margin-bottom: 0.8rem;
    color: #2c3e50;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
}

.admin-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.admin-bookings, .admin-settings, .admin-spots {
    margin: 2rem 0;
}

.booking-filters {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    align-items: end;
}

.bookings-table {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.bookings-table table {
    width: 100%;
    border-collapse: collapse;
}

.bookings-table th, .bookings-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bookings-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.bookings-table tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.completed {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.failed {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.spots-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.form-container h3 {
    margin-bottom: 1rem;
}
/* Calendario Compatto */
.calendar-header-row {
    display: grid;
    grid-template-columns: 100px repeat(31, 1fr);
    gap: 2px;
    margin-bottom: 5px;
}

.spot-row {
    display: grid;
    grid-template-columns: 100px repeat(31, 1fr);
    gap: 2px;
    margin-bottom: 5px;
}

.day-header, .spot-name {
    font-weight: bold;
    text-align: center;
    padding: 0.5px;
    background: #f0f0f0;
}

.day-cell[data-tooltip] {
    position: relative;
}

.day-cell[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    display: none;
}

.day-cell[data-tooltip]:hover::after {
    display: block;
}

.day-cell {
    height: 30px;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
}

/* Stati delle celle */
.day-cell.booked {
    background-color: #ffdddd; /* Rosso chiaro */
    position: relative;
}
/* 
.day-cell.booked::after {
    content: "Prenotato";
    font-size: 0.6em;
    position: absolute;
    bottom: 2px;
    width: 100%;
    text-align: center;
} */



/* .day-cell.booked {
    background-color: #ffcccc;
    cursor: not-allowed;
} */

.day-cell.blocked {
    background-color: #ffffcc;
    cursor: not-allowed;
}

.day-cell.past {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

.day-cell.selected {
    background-color: #ccffcc;
    border: 2px solid #00aa00;
}

/* Navigazione */
.calendar-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.calendar-navigation button {
    padding: 5px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.calendar-navigation button:hover {
    background: #2980b9;
}