/* Disc Exchange Custom Styles */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Disc Cards */
.disc-card {
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.disc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.disc-card .card-img-top {
    height: 200px;
    object-fit: cover;
    background-color: #f8f9fa;
}

.disc-card-placeholder {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    color: #6c757d;
}

.disc-card-placeholder i {
    font-size: 4rem;
}

/* Flight Numbers Badge */
.flight-numbers {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Condition Badges */
.badge-condition {
    text-transform: capitalize;
}

/* Disc Gallery */
.disc-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.disc-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.disc-gallery img:hover {
    opacity: 0.8;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f8f9fa;
}

.autocomplete-item .disc-name {
    font-weight: 600;
}

.autocomplete-item .disc-brand {
    color: #6c757d;
    font-size: 0.875rem;
}

.autocomplete-item .disc-flight {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #495057;
}

/* Proposal Cards */
.proposal-card {
    border-left: 4px solid;
}

.proposal-card.pending {
    border-left-color: #ffc107;
}

.proposal-card.accepted {
    border-left-color: #198754;
}

.proposal-card.rejected {
    border-left-color: #dc3545;
}

.proposal-card.cancelled {
    border-left-color: #6c757d;
}

/* Exchange Arrow */
.exchange-arrow {
    font-size: 2rem;
    color: #6c757d;
}

/* Wishlist Priority */
.priority-high {
    border-left: 3px solid #dc3545;
}

.priority-medium {
    border-left: 3px solid #ffc107;
}

.priority-low {
    border-left: 3px solid #198754;
}

/* Filter Form */
.filter-form .form-control,
.filter-form .form-select {
    font-size: 0.875rem;
}

/* Pagination */
.pagination {
    justify-content: center;
}

/* Image Upload Preview */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.image-preview {
    position: relative;
    width: 100px;
    height: 100px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.375rem;
}

.image-preview .delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* User Info */
.user-avatar {
    width: 40px;
    height: 40px;
    background-color: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Messages */
.messages-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.message-wrapper {
    display: flex;
    margin-bottom: 1rem;
}

.message-wrapper.message-own {
    justify-content: flex-end;
}

.message-wrapper.message-other {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    position: relative;
}

.message-own .message-bubble {
    background-color: #0d6efd;
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message-other .message-bubble {
    background-color: white;
    color: #212529;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: 0.25rem;
}

.message-content {
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message-meta {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.message-own .message-meta {
    text-align: right;
}

.message-sender {
    font-weight: 600;
}

.message-time {
    margin-left: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .disc-card .card-img-top {
        height: 150px;
    }

    .disc-gallery img {
        height: 100px;
    }

    .exchange-arrow {
        transform: rotate(90deg);
    }

    .message-bubble {
        max-width: 85%;
    }
}
