/* Book Detail Page Styles */

.book-cover-large {
    width: 200px;
    height: 300px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.author-link {
    color: var(--link-color);
    text-decoration: none;
}

.rating-link {
    font-weight: bold;
    text-decoration: none;
}

.favorite-btn {
    margin-top: 20px;
    margin-right: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.bookshelf-btn {
    margin-top: 20px;
    margin-right: 15px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    background-color: var(--link-color);
    color: #fff;
}

.recommend-btn {
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.read-btn {
    margin-top: 20px;
    margin-right: 15px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}


.action-buttons-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.feedback-text {
    margin-top: 10px;
    font-size: 12px;
}

.book-detail-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    background-color: var(--secondary-bg);
}
.book-info span {
    color: var(--text-color-secondary);
}

.book-details {
    flex: 1;
    margin-left: 30px;
}

.page-container {
    padding: 30px;
    background: var(--background-color);
    min-height: 100vh;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

.status-btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 12px;
    background: #007bff;
    color: #fff;
    border: 2px solid #007bff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.status-btn.reading {
    background: transparent;
    color: var(--link-color);
    border: 2px solid #007bff;
}

.status-btn.finished {
    background: #007bff;
    color: #fff;
    border: 2px solid #007bff;
}

.status-btn.selected {
    border: 3px solid #0056b3;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.review-textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

.save-review-btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: #fff;
    border: 2px solid #007bff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.change-status-btn {
    margin-top: 10px;
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--link-color);
    border: 2px solid #007bff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.modal-feedback {
    margin-top: 15px;
}

.review-removal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.other-editions-section {
    max-width: 800px;
    margin: 20px auto 0;
}

.other-editions-container {
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.other-editions-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: var(--background-color);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background-color 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.other-editions-item:hover {
    background: #e9ecef;
}

.other-editions-image {
    width: 60px;
    height: 90px;
    object-fit: contain;
    border-radius: 4px;
    margin-right: 15px;
}

.other-editions-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--text-color);
}

.other-editions-author {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.other-editions-year {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: #888;
}

.other-editions-isbn {
    margin: 0;
    font-size: 12px;
    color: #888;
}

.other-editions-header {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.base-btn-style {
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.modal-action-btn {
    padding: 10px 20px;
    margin-right: 10px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.confirm-btn {
    padding: 10px 20px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.rating-color {
    color: #ff6b35;
}

.other-editions-item-link {
    text-decoration: none;
    color: inherit;
}

.modal-header {
    margin: 0 0 20px 0;
    color: var(--text-color);
}

.review-removal-header {
    color: #dc3545;
}

.modal-subheader {
    margin-bottom: 15px;
}

.modal-description {
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-buttons-right {
    text-align: center;
}

/* Recommendation Modal Styles */
.recommend-modal {
    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: 1000;
}

.recommend-modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.recommend-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.recommend-modal-title {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.close-recommend-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-recommend-modal:hover {
    background-color: #f0f0f0;
    color: #333;
}

.friends-list-section {
    margin-bottom: 20px;
}

.friends-list-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.friends-list-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.friend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.friend-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.friend-item span {
    vertical-align: middle;
}

.reason-section {
    margin-bottom: 20px;
}

.reason-label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.recommend-reason {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
}

.recommend-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cancel-recommend, .send-recommendations {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.cancel-recommend {
    background-color: #6c757d;
    color: white;
}

.cancel-recommend:hover {
    background-color: #5a6268;
}

.send-recommendations {
    background-color: #007bff;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
    transition: all 0.3s ease;
}

.send-recommendations:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    transform: translateY(-1px);
}

.book-recommend-feedback {
    margin-top: 10px;
    font-size: 14px;
}

/* Error Modal Styles */
.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.error-modal-header {
    color: #dc3545;
    margin-bottom: 15px;
}

.error-modal-content {
    padding: 20px;
    color: #dc3545;
    font-weight: bold;
    text-align: center;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
    .book-detail-container {
        flex-direction: column;
        align-items: center;
        padding: 20px;
        gap: 20px;
    }

    .book-cover-large {
        width: 150px;
        height: 225px;
        order: -1; /* Show cover above details */
    }

    .book-details {
        margin-left: 0;
        text-align: center;
        width: 100%;
    }

    .action-buttons-section {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .favorite-btn,
    .bookshelf-btn,
    .recommend-btn,
    .read-btn {
        margin: 5px 0;
        width: 200px;
        font-size: 13px;
        padding: 12px 16px;
    }

    .page-container {
        padding: 15px;
    }

    .other-editions-section {
        margin-top: 15px;
    }

    .other-editions-container {
        padding: 15px;
    }

    .other-editions-item {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }

    .other-editions-image {
        width: 80px;
        height: 120px;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .modal-content {
        max-width: 95%;
        padding: 20px;
    }

    .recommend-modal-content {
        max-width: 95%;
        padding: 20px;
    }

    .friends-list-container {
        max-height: 150px;
    }
}