/* 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;
}

/* 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;
    }
}
