/* BookEasy v2 Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Cards */
.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Status badges */
.status-badge {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.status-started {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-open {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-finished {
    background-color: #e8f5e9;
    color: #388e3c;
}

.status-request {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.status-in-progress {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-accepted {
    background-color: #e8f5e9;
    color: #388e3c;
}

.status-rejected {
    background-color: #ffebee;
    color: #c62828;
}

.status-agreement {
    background-color: #e0f2f1;
    color: #00695c;
}

/* Event cards */
.event-card {
    margin-bottom: 1rem;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Invitation cards */
.invitation-card {
    border-left: 4px solid var(--primary-color);
}

.invitation-card.unresolved {
    border-left-color: var(--warning-color);
    background-color: #fffbf0;
}

/* Simple list view with light blue background */
.simple-list {
    background: white;
    overflow: hidden;
}

.simple-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #e3f2fd;
    border-bottom: 1px solid #bbdefb;
    text-decoration: none;
    color: #212529;
    transition: background-color 0.2s;
    position: relative;
    margin-bottom: 8px;
    border-radius: 8px;
}

.simple-list-item:last-child {
    border-bottom: none;
}

.simple-list-item:hover {
    background-color: #bbdefb;
}

.simple-list-item.has-unread {
    border-left: 4px solid #1976d2;
    background-color: #e1f5fe;
}

.simple-list-item.has-unread:hover {
    background-color: #b3e5fc;
}

.simple-list-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.simple-list-item-title {
    font-weight: 500;
    font-size: 1rem;
}

.simple-list-item.has-unread .simple-list-item-title {
    font-weight: 600;
}

.simple-list-item-right {
    color: #5f6368;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Chevron rotation for collapsible items */
.simple-list-item[data-bs-toggle="collapse"] .bi-chevron-down {
    transition: transform 0.2s;
}

.simple-list-item[data-bs-toggle="collapse"]:not(.collapsed) .bi-chevron-down {
    transform: rotate(180deg);
}

.unread-indicator {
    width: 8px;
    height: 8px;
    background-color: #1976d2;
    border-radius: 50%;
    display: inline-block;
}

/* Outlook-style list view */
.inbox-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.inbox-item {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
    cursor: pointer;
    position: relative;
}

.inbox-item:hover {
    background-color: #f8f9fa;
}

.inbox-item.unread {
    border-left: 4px solid #0d6efd;
    background-color: #f8f9ff;
}

.inbox-item.unread:hover {
    background-color: #eff3ff;
}

.inbox-item.unresolved {
    border-left: 4px solid #ffc107;
    background-color: #fffbf0;
}

.inbox-item.unresolved:hover {
    background-color: #fff8e1;
}

.inbox-item-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.inbox-item-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.inbox-item-content {
    padding: 0 16px 16px 16px;
    display: none;
    border-top: 1px solid #e9ecef;
    background-color: #fafbfc;
}

.inbox-item.expanded .inbox-item-content {
    display: block;
}

.inbox-item-title {
    font-weight: 600;
    font-size: 1rem;
    color: #212529;
    margin: 0;
    flex: 1;
}

.inbox-item.unread .inbox-item-title {
    font-weight: 700;
}

.inbox-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #6c757d;
}

.inbox-item-date {
    white-space: nowrap;
    font-size: 0.875rem;
    color: #6c757d;
}

.inbox-item-snippet {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 4px 0 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbox-item.unread .inbox-item-snippet {
    color: #495057;
}

.inbox-chevron {
    transition: transform 0.2s;
    color: #6c757d;
}

.inbox-item.expanded .inbox-chevron {
    transform: rotate(90deg);
}

.inbox-item-actions {
    padding: 12px 0 0 0;
    border-top: 1px solid #e9ecef;
    margin-top: 12px;
}

/* Unread badge */
.unread-badge {
    width: 8px;
    height: 8px;
    background-color: #0d6efd;
    border-radius: 50%;
    display: inline-block;
    margin-left: 4px;
}

/* Empty state */
.inbox-empty {
    padding: 48px 24px;
    text-align: center;
    color: #6c757d;
}

.inbox-empty i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 16px;
}

/* Message thread */
.message-thread {
    max-height: 400px;
    overflow-y: auto;
}

.message {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

.message-from-consumer {
    background-color: #e3f2fd;
    margin-left: 2rem;
}

.message-from-resource {
    background-color: #f3e5f5;
    margin-right: 2rem;
}

.message-from-me {
    background-color: #e3f2fd;
    margin-left: 2rem;
    border-left: 3px solid var(--primary-color);
}

.message-timestamp {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Forms */
.conditions-form {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Alert for unresolved offers */
.alert-unresolved {
    border-left: 4px solid var(--warning-color);
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Resource search results */
.resource-card {
    cursor: pointer;
    transition: all 0.2s;
}

.resource-card:hover {
    border-color: var(--primary-color);
}

.resource-card.selected {
    border-color: var(--success-color);
    border-width: 2px;
    background-color: #f0f8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .message-from-consumer,
    .message-from-resource {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Button spacing and layout */
.gap-2 {
    gap: 0.5rem !important;
}

.conditions-form .btn {
    margin-bottom: 0.5rem;
}

/* Modal customizations */
.modal-header.bg-success,
.modal-header.bg-danger {
    border-bottom: 0;
}

.modal-body .alert {
    margin-bottom: 1rem;
}


.booking-status-1 { border-left: 3px solid #bbdefb; }
.booking-status-2{border-left: 3px solid blue; }
.booking-status-3{border-left: 3px solid orange; }
.booking-status-4{border-left: 3px solid purple; }
.booking-status-5{border-left: 3px solid teal; }
.booking-status-6{border-left: 3px solid brown; }
.booking-status-7{border-left: 3px solid pink; }
.booking-status-8 { border-left: 3px solid red; }