/* 교환 관리 페이지 스타일 */

/* 메인 컨테이너 */
.exchanges-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 페이지 제목 */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

/* 예약 유형 탭 */
.booking-type-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.booking-type-tab {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    background-color: #f5f5f5;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.booking-type-tab i {
    font-size: 1.1rem;
}

.booking-type-tab:hover {
    background-color: #e9e9e9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.booking-type-tab.active {
    background-color: #4361ee;
    color: #fff;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

/* 상태 필터 */
.status-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.status-filter {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-filter:hover {
    border-color: #4361ee;
    color: #4361ee;
}

.status-filter.active {
    background-color: #4361ee;
    border-color: #4361ee;
    color: #fff;
}

/* 교환 목록 */
.exchange-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.exchange-item {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.exchange-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.exchange-content {
    display: flex;
    padding: 1.5rem;
}

.exchange-image {
    width: 180px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.exchange-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.exchange-details {
    flex: 1;
    padding: 0 1.5rem;
}

.exchange-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.exchange-host,
.exchange-guest {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: #666;
}

.host-avatar,
.guest-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.exchange-date,
.exchange-points {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: #666;
}

/* 교환 타입 스타일 */
.exchange-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: #666;
}

.exchange-type.clickable {
    cursor: pointer;
    transition: color 0.2s;
}

.exchange-type.clickable:hover {
    color: #4361ee;
}

.exchange-type i {
    margin-right: 5px;
}

.exchange-type.clickable:hover i {
    color: #4361ee;
}

.exchange-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.exchange-status {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.exchange-status.pending {
    background-color: #f59e0b;
}

.exchange-status.confirmed {
    background-color: #10b981;
}

.exchange-status.completed {
    background-color: #6366f1;
}

.exchange-status.cancelled {
    background-color: #ef4444;
}

/* 버튼 스타일 - 페이지 내부에서만 사용되는 버튼에 한정 */
.exchange-actions .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.exchange-actions .btn-primary {
    background-color: #4361ee;
    color: #fff;
    border: none;
}

.exchange-actions .btn-primary:hover {
    background-color: #3a56d4;
    transform: translateY(-2px);
}

.exchange-actions .btn-outline {
    background-color: transparent;
    color: #4361ee;
    border: 1px solid #4361ee;
}

.exchange-actions .btn-outline:hover {
    background-color: rgba(67, 97, 238, 0.05);
    transform: translateY(-2px);
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination-prev,
.pagination-next {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-prev:hover,
.pagination-next:hover {
    background-color: #e9e9e9;
}

.pagination-prev:disabled,
.pagination-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
}

.pagination-page {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-page:hover {
    border-color: #4361ee;
    color: #4361ee;
}

.pagination-page.active {
    background-color: #4361ee;
    border-color: #4361ee;
    color: #fff;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .exchange-content {
        flex-direction: column;
    }

    .exchange-image {
        width: 100%;
        height: 180px;
        margin-bottom: 1rem;
    }

    .exchange-details {
        padding: 0;
        margin-bottom: 1rem;
    }

    .exchange-actions {
        flex-direction: row;
    }

    .exchange-actions .btn {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .booking-type-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .booking-type-tab {
        width: 100%;
        justify-content: center;
    }

    .status-filters {
        overflow-x: auto;
        padding-bottom: 0.5rem;
        justify-content: flex-start;
    }

    .exchange-actions {
        flex-direction: column;
    }
}

/* 로딩 표시 */
.exchange-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: #666;
}

.exchange-loading i {
    font-size: 2rem;
    color: #4361ee;
    margin-bottom: 1rem;
}

.initial-loading {
    min-height: 300px;
    background-color: #f9f9f9;
    border-radius: 12px;
    margin-top: 2rem;
}

.loading-indicator {
    text-align: center;
    padding: 1rem;
    display: none;
}

/* 리뷰 모달 스타일 */
.review-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 400px;
    max-width: 90%;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.review-modal .modal-content {
    position: relative;
    width: 100%;
}

.review-modal .modal-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.review-modal .modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.review-modal .close-button {
    position: absolute;
    right: -10px;
    top: -10px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
}

.review-modal .close-button:hover {
    color: #333;
}

.review-modal .modal-body {
    margin-bottom: 20px;
}

.review-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* 별점 스타일 */
.rating-container {
    margin-bottom: 20px;
}

.rating-container p {
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.star-rating {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
}

.star {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star:hover,
.star.active {
    color: #ffd700;
}

.rating-text {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

/* 댓글 입력 스타일 */
.comment-container {
    margin-top: 20px;
}

.comment-container p {
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

#reviewComment {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

#reviewComment:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.1);
}

/* 버튼 스타일 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background-color: #e9e9e9;
}

.btn-primary {
    background-color: #4361ee;
    color: white;
}

.btn-primary:hover {
    background-color: #3a56d4;
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 리뷰 버튼 스타일 */
.btn-review {
    background-color: #10b981;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-review:hover {
    background-color: #059669;
    transform: translateY(-1px);
}
