/* General Styles */
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Login Page Specific Styles */
.bg-primary {
    background: linear-gradient(45deg, #0d6efd, #0d6efd);
}

.card.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.btn-check:checked+.btn-outline-primary {
    background-color: #0d6efd;
    color: white;
}

/* Admin/Advisor Panel Styles */
.navbar-dark.bg-dark {
    background-color: #212529 !important;
}

.user-select-all {
    user-select: all;
    direction: ltr;
    display: inline-block;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Advisor "macOS-like" Header */
.os-style-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8) !important;
}

#advisor-toolbar .btn {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}

#advisor-toolbar .btn:hover {
    transform: scale(1.1);
    color: #0d6efd;
}

.icon-placeholder {
    background-color: #f8f9fa;
    transition: all 0.2s ease-in-out;
    cursor: default;
}

.icon-placeholder:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

.list-group-item-action {
    font-weight: 500;
}

.list-group-item-action:hover, .list-group-item-action:focus {
    background-color: #e9ecef;
    color: #000;
}

/* Choice Cards */
.choice-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--card-background);
}

.choice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.choice-card .bi {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.choice-card h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.choice-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Calendar Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.calendar-day-name {
    font-weight: bold;
    color: #6c757d;
}

.calendar-day {
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #e9ecef;
}

.calendar-day.today {
    background-color: #0d6efd;
    color: white;
}

.calendar-day.selected {
    background-color: #28a745;
    color: white;
}

.calendar-day.empty {
    cursor: default;
}
.calendar-day.empty:hover {
    background-color: transparent;
}

/* Chat Interface Styles */
.chat-window {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px); /* Full height minus nav/padding */
    background-color: #f4f7f6;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
}

.chat-message.sent {
    background-color: #0d6efd;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.received {
    background-color: #e9ecef;
    color: #212529;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message small {
    display: block;
    font-size: 0.75em;
    margin-top: 4px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    #student-actions-container .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .container.my-5 {
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    #chat-container {
        height: calc(100vh - 80px);
        margin: 0 !important;
        padding: 0 !important;
    }

    .chat-window {
        height: 100%;
    }
}

/* Fullscreen Chat for Mobile */
@media (max-width: 768px) {
    body.chat-active .container,
    body.chat-active .navbar,
    body.chat-active header {
        display: none;
    }

    body.chat-active #chat-container {
        display: flex !important; /* Use flex to control children */
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #f8f9fa;
        z-index: 2000;
        padding: 1rem;
    }

    body.chat-active #chat-container .chat-window {
        flex-grow: 1; /* Allow window to fill space */
        height: auto; /* Override other height rules */
        border: none;
        box-shadow: none;
    }

    body.chat-active #main-content {
        display: block;
        height: 100%;
    }

    body.chat-active .chat-fullscreen-container {
        display: flex !important;
        flex-direction: column;
        height: 100%;
    }
}
