/* appointments.css - Updated Version */
/* Timestamp: 2025-06-08 */
/* Changes: Fixed Share button functionality, implemented card grid layout, added tooltip icon styles */

.sidebar {
    width: 250px;
    background-color: #f5f8fa;
    position: fixed;
    height: 100%;
    overflow: auto;
    transition: all 0.3s;
    z-index: 900;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    padding: 0;
}

.sidebar ul li a {
    padding: 15px;
    display: block;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar ul li a:hover, .sidebar ul li a.active {
    background-color: #e0e0e0;
    border-left: 3px solid var(--primary-color);
}

.sidebar ul li a i {
    margin-right: 10px;
}

.container {
    display: flex;
}

.content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }

    .sidebar.active {
        margin-left: 0;
    }

    .content {
        margin-left: 0;
    }

    .content.active {
        margin-left: 250px;
    }
}

.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-left h1 {
    margin: 0;
    margin-left: 15px;
    font-size: 22px;
}

.menu-toggle {
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.navbar-right {
    display: flex;
    align-items: center;
}

.user-info {
    margin-right: 15px;
}

.user-actions {
    display: flex;
    align-items: center;
}

.btn-logout, .btn-settings {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 5px 10px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover, .btn-settings:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Appointment specific styles */
.appointments-container {
    padding: 20px;
    max-width: 800px; /* Constrain width for a 6x9 aspect ratio */
    margin: 0 auto;   /* Center the container */
}

.appointments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.appointments-buttons {
    display: flex;
    gap: 10px; /* Space between buttons */
}

/* Tooltip styling */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position above the tooltip */
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Appointment form styling */
.appointment-form {
    max-width: 600px; /* Constrain form width */
    margin: 0 auto;   /* Center the form */
}

/* Appointments list styling */
.appointments-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
    gap: 20px; /* Space between cards */
}

.appointment-card {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .appointments-list {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }

    .appointment-form {
        width: 90%; /* Make form width responsive on mobile */
    }

    .appointments-header {
        flex-direction: column; /* Stack title and buttons on mobile */
        align-items: flex-start; /* Align items to the start */
    }

    .appointments-buttons {
        width: 100%; /* Make buttons full width on mobile */
        margin-top: 10px; /* Space above buttons */
    }
}

/* Additional Appointment Styles */
.appointment-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.appointment-tab {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    background-color: #f5f5f5;
}

.appointment-tab.active {
    background-color: white;
    border-color: #ddd;
    border-bottom-color: white;
    margin-bottom: -1px;
    color: var(--primary-color);
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.no-appointments {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    background-color: #f9f9f9;
    border-radius: 8px;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

.status-confirmed {
    background-color: var(--secondary-color);
    color: white;
}

.status-pending {
    background-color: var(--warning-color);
    color: white;
}

.status-canceled {
    background-color: var(--danger-color);
    color: white;
}

.status-completed {
    background-color: var(--primary-color-light);
    color: white;
}

/* Calendar styles */
.calendar-view {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 20px;
}

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

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background-color: #f5f5f5;
}

.calendar-day {
    min-height: 80px;
    border: 1px solid var(--border-color);
    padding: 5px;
    position: relative;
}

.calendar-day-number {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.calendar-day.today {
    background-color: #e8f5e9;
    border-color: var(--secondary-color);
}

.calendar-day.other-month {
    background-color: #f9f9f9;
    color: #ccc;
}

.calendar-event {
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    padding: 2px 5px;
    margin-top: 20px;
    font-size: 11px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-date {
    font-size: 20px;
    font-weight: bold;
}
	/* Force remove sidebar margin for appointments page */
.appointments-container { margin-left: 0 !important; }

@media (max-width: 768px) {
    .appointment-details {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .calendar-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .calendar-day-header {
        display: none;
    }

    .calendar-day {
        display: flex;
        align-items: center;
        min-height: 40px;
    }

    .calendar-day-number:before {
        content: attr(data-day);
        margin-right: 5px;
    }
}
/* Nuclear option - remove sidebar margins and center content */
.content { 
    margin-left: auto !important; 
    margin-right: auto !important;
    max-width: 1200px !important;
}
main.content { 
    margin-left: auto !important; 
    margin-right: auto !important;
    max-width: 1200px !important;
}
.appointments-container { 
    margin-left: auto !important; 
    margin-right: auto !important;
}

/* Also target any potential sidebar offset classes */
.content.sidebar-open { 
    margin-left: auto !important; 
    margin-right: auto !important;
}
.main-content { 
    margin-left: auto !important; 
    margin-right: auto !important;
}