:root {
    --primary-color: #6a1b9a;
    --secondary-color: #ff6f00;
    --accent-color: #ff4081;
    --dark-bg: #1a1a1a;
    --light-text: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --gradient: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

body {
    background: var(--dark-bg);
    color: var(--light-text);
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://images.unsplash.com/photo-1560066984-138dadb4c035?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    padding: 4rem 2rem;
    border-radius: 20px;
    margin: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}
.hero h1 {
	color: white !important;
}

.container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
/*
header nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}
*/

header nav{
    display: flex;
    gap: 10px; 
}

header nav a {
    flex: 1; 
    text-align: center; 
    padding: 10px; 
    background-color: #007bff; 
    color: white; 
    text-decoration: none; 
    border-radius: 5px; 
}

header nav a:hover {
    background-color: #0056b3; 
}


.alert {
    padding: 10px;
    margin: 20px 0;
    border-radius: 5px;
}

.error {
    background: #ffd4d4;
    color: #850000;
}

.success {
    background: #d4ffd4;
    color: #008500;
}

.form-group {
    margin: 15px 0;
}

input {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
}
/* Dashboard Specific Styles */
.dashboard-header {
    //display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}
section.head {
	border-bottom: 2px solid #eee;
}
.bookings-section {
    margin: 2rem 0;
}

.bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.booking-card {
    /*background: #fff;*/
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.booking-status {
    background: #4CAF50;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.booking-details p {
    margin: 0.5rem 0;
    color: #555;
}

.booking-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn-cancel {
    background: #ff4444;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-cancel:hover {
    background: #cc0000;
}

.bookings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.bookings-table th,
.bookings-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bookings-table th {
    background-color: #f5f5f5;
}

.no-bookings {
    text-align: center;
    padding: 2rem;
    /*background: #f8f9fa;*/
    border-radius: 8px;
    margin: 2rem 0;
}
.loading {
    color: #666;
    font-size: 0.9em;
    padding: 10px;
    border: 1px solid #ddd;
    margin-top: 5px;
    border-radius: 4px;
    background: #f8f9fa;
}

select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}
.date-container {
    position: relative;
}

.date-container input {
    width: 100%;
    padding: 10px;
}

.date-container::before {
    content: "Seleziona la data";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.date-container input:focus + ::before,
.date-container input:not(:placeholder-shown) + ::before {
    display: none;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.align-items-center {
    align-items: center;
    justify-content: center;
}
/* Stili specifici per la pagina di prenotazione */
#booking-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    /*background: #fff;*/
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-control {
    width: 100%;
    padding: 8px;
    margin: 5px 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}


/* Service Grid */
.service-grid, .operator-grid, .time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.service-card, .operator-card {
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before, .operator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: 0.5s;
}

.service-card:hover::before, .operator-card:hover::before {
    left: 100%;
}

.service-card.selected, .operator-card.selected {
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 0 25px rgba(106, 27, 154, 0.5);
}

.card-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.form-label {
    display: block;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--light-text);
    opacity: 0.9;
}
/* Card Selezione */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.card-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(106, 27, 154, 0.7);
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
	text-align: center;
}

.card-select.selected {
    background: linear-gradient(45deg, #6a1b9a, #ff6f00);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(106, 27, 154, 0.3);
}

/* Slot Temporali */
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.time-slot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-slot.selected {
    background: #c9469b;
    border-color: transparent;
}
.time-slot.disabled {
    opacity: 0.5;
    pointer-events: none;
    background-color: #eee;
}
/* Messaggi */
.info, .loading, .error {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}
/*
.btn-disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}
*/
.btn-disabled {
    position: relative;
    cursor: not-allowed;
}

.btn-disabled:hover::after {
    content: "È possibile cancellare fino a 45 minuti prima dell'appuntamento";
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
    z-index: 1000;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.loading {
    background: url('data:image/svg+xml,<svg ...>...</svg>') no-repeat center;
}

.error {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid #ff4d4d;
}
.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 2px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.timeline-slot {
    padding: 8px;
    min-height: 60px;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    position: relative;
	text-align: center;
}

.timeline-slot.free {
    background: #e9f5e9;
}

.timeline-slot.booked {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.time-label {
    font-size: 0.8em;
    color: #6c757d;
    margin-bottom: 3px;
}

.appointment-info {
    font-size: 0.75em;
    line-height: 1.2;
}

[data-toggle="tooltip"] {
    cursor: help;
}
.timeline-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1px;
        background: #ddd;
    }

    .timeline-slot {
        background: white;
        min-height: 60px;
        padding: 2px;
        position: relative;
        cursor: pointer;
        transition: all 0.2s;
    }

    .timeline-slot.booked {
        background: #ffd7da;
        border-left: 3px solid #dc3545;
    }

    .timeline-slot.free {
        background: #e8f5e9;
        border-left: 3px solid #28a745;
    }

    .slot-content {
        padding: 5px;
        height: 100%;
    }

    .btn-delete {
        position: absolute;
        top: 5px;
        right: 10px;
        padding: 0;
        background: none;
        border: none;
        color: #dc3545;
        opacity: 0;
        transition: opacity 0.2s;
    }

    .timeline-slot:hover .btn-delete {
        opacity: 1;
    }

    .add-booking {
        display: none;
        text-align: center;
        color: #28a745;
    }

    .free-slot:hover .add-booking {
        display: block;
    }
	
	
#login .btn-google {
    background: #fff;
    color: #5F6368;
    //border: 1px solid #DADCE0;
    display: block;
	width: 210px;
    margin: 20px auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
	border: 1px solid #948e8f !important;
}

.btn-google:hover {
    border-color: #aeb0b3;
    background: #f8f9fa;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6a1b9a;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.password-toggle:hover {
    opacity: 1;
}

.divider {
    margin: 2rem 0;
    position: relative;
    color: #6a1b9a;
}

.divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #E0E0E0;
    z-index: 1;
}

.divider-text {
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 15px;
}
.checkbox-container {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: 16px;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #f0f0f0;
    margin-right: 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.checkbox-input:checked ~ .checkmark {
    background-color: #2ecc71;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-input:checked ~ .checkmark:after {
    display: block;
}
.past-slot {
    background-color: #f0f0f0 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.past-slot .add-booking {
    display: none !important;
}

.past-slot.booked {
    background-color: #ffe8e8 !important;
}

@media (max-width: 1024px) {
	.container {
		margin: 0px auto;
	}
	nav span {
		display:none;
	}
	.modal {
		z-index: 9999999999 !important;
	}
	.modal.show .modal-dialog {
		z-index: 9999999999999999 !important;
	}
	.modal.show .modal-dialog .modal-content {
		z-index: 9999999999999999999999999999999999999999999999999999999999 !important;
		background: black !important;
	}
	.modal-backdrop {
		z-index: 9999999999 !important;
		display:none !important;
	}
}
