﻿/* Container */
.container-appointment {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
h1 {
    text-align: center;
    margin-bottom: 20px;
}

/* Book New Appointment */
.book-new-appointment {
    text-align: center;
    margin-bottom: 20px;
}

    .book-new-appointment button {
        padding: 10px 20px;
        background-color: white;
        color: #28a745; /* Green */
        border: 2px solid #28a745; /* Green */
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.4s, color 0.4s, transform 0.4s;
        position: relative;
        overflow: hidden;
    }

        .book-new-appointment button::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 300%;
            height: 300%;
            background-color: rgba(40, 167, 69, 0.15); /* Green with opacity */
            transition: all 0.75s;
            border-radius: 50%;
            transform: translate(-50%, -50%) scale(0);
        }

        .book-new-appointment button:hover::before {
            transform: translate(-50%, -50%) scale(1);
        }

        .book-new-appointment button:hover {
            background-color: #28a745; /* Green */
            color: white;
            transform: scale(1.1);
        }

/* Tabs Section */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    background-color: #f1f1f1;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
    transition: background-color 0.3s, color 0.3s;
}

    .tab-button.active {
        background-color: #28a745; /* Green */
        color: white;
    }

    .tab-button:hover:not(.active) {
        background-color: #ddd;
    }

/* Appointments Container */
.appointments-container {
    display: flex;
    justify-content: space-between;
}

.appointments-column {
    width: 100%;
}

/* Appointments Section */
.appointments-section {
    margin-bottom: 40px;
}

.appointment-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.appointment-details {
    flex: 1;
}

.appointment-side {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.appointment-qr-code {
    margin-bottom: 10px;
}

.appointment-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .btn:hover {
        background-color: #45a049;
    }

    /* Specific button styles */
    .btn.reschedule {
        background-color: #FFA500; /* Orange */
    }

        .btn.reschedule:hover {
            background-color: #FF8C00; /* Dark Orange */
        }

    .btn.cancel {
        background-color: #FF6347; /* Tomato */
    }

        .btn.cancel:hover {
            background-color: #FF4500; /* Orange Red */
        }

    /* Disabled Confirm button */
    .btn.confirm.disabled {
        background-color: grey;
    }

    /* Enabled Confirm button */
    .btn.confirm.enabled {
        background-color: green;
        cursor: pointer;
    }

.upcoming {
    border-left: 5px solid #4CAF50;
}

.past {
    border-left: 5px solid #FF6347;
}

.canceled {
    border-left: 5px solid #FF6347;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it appears above other content */
}

/* Modal */
.modal {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: inline-block;
    min-width: 250px; /* Optional: for minimum usability */
    max-width: 90vw; /* Responsive on small screens */
    z-index: 1001;
}

    .modal h3 {
        margin-top: 0;
    }

    .modal textarea {
        width: 100%;
        height: 100px;
        margin-bottom: 1rem;
        padding: 0.5rem;
        border-radius: 5px;
        border: 1px solid #ccc;
        box-sizing: border-box;
    }

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

    .modal-actions .btn {
        margin-left: 1rem;
    }

.modal-title,
.modal-message {
    text-align: center;
    width: 100%;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

@media (max-width: 600px) {
    .container-appointment {
        width: 98%;
        padding: 10px;
    }

    .appointments-container {
        flex-direction: column;
        align-items: stretch;
    }

    .appointments-column {
        width: 100%;
    }

    .appointment-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .appointment-side {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
        margin-top: 10px;
    }

    .appointment-qr-code {
        margin-bottom: 0;
        margin-right: 10px;
    }

    .appointment-actions {
        gap: 5px;
    }

    .modal {
        padding: 1rem;
        min-width: unset;
        max-width: 98vw;
    }

    .tab-button {
        flex: 1 1 0;
        font-size: 0.95rem;
        padding: 8px 0;
    }

    .appointment-qr-code img, .appointment-qr-code svg {
        max-width: 100px;
        height: auto;
    }

    .appointment-actions {
        gap: 12px;
    }

    h1, h2 {
        font-size: 1.2rem;
    }

    .appointment-card {
        font-size: 0.98rem;
    }

    .appointment-card {
        padding: 8px;
    }
}
