﻿/* \wwwroot\css\books.css */

.details-modal-content {
}

.modal-header {
}

/* ==============================================================
   SHELF BOOK CARDS (2:3 ratio)
   Universal sizing for both shelf scroll and expanded grids
   ============================================================== */

/* Slightly smaller for tabular header cells to keep table compact */
.all-books-table thead th {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e6e6e6;
}

/* Ensure link styling matches div styling for Chapter of Week */
.shelf-book-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 107px;
    flex-shrink: 0;
    transition: transform 0.2s ease; /* smooth hover */
}

    .shelf-book-card:hover
    .price-badge {
        /*transform: translateY(-4px) scale(1.02);*/
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14) !important;
        outline: none;
        opacity: 1;
    }

    .shelf-book-card:hover {
        transform: scale(1.04);
    }

    .shelf-cover-wrapper {
        width: 100%;
        height: 160px;
        overflow: hidden;
        background: #f8f9fa;
        position: relative;
    }

.shelf-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shelf-book-card .book-title {
    color: #000 !important;
    font-weight: 400;
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    height: 2.6em; /* 2 lines × 1.3 line-height */
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Book title styling for grid views */
.book-title {
    margin-top: 5px;
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #000 !important;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Layout classes (grids, shelves) are in shelf.css */

#bookDetailsModal {
    z-index: 2000;
}

.modal-backdrop {
    z-index: 1999;
}

/* Ensure Bootstrap modal stacks above any decorative hero layers that create new stacking contexts */
/* Leave modal z-index to default/targeted values above (2000/1999) */


/* Remove the default header line */
#bookDetailsModal .custom-header {
    border-bottom: none !important;
    background: #ffffff !important;
    padding: 10px 15px !important;
}

/* Style the Close button */
#bookDetailsModal .close-text-btn {
    background: #c62828 !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
}

    #bookDetailsModal .close-text-btn:hover {
        background: #b71c1c !important;
    }

/* Title centered on its own line */
#bookDetailsModal .modal-title-wrapper {
    text-align: center;
    padding: 5px 20px 10px 20px;
}

    #bookDetailsModal .modal-title-wrapper .modal-title {
        margin: 0;
        font-size: 1.4rem;
        font-weight: 600;
        color: #000;
    }


#bookDetailsModal .modal-header,
#bookDetailsModal .modal-title,
#bookDetailsModal h5 {
    color: #000 !important; /* force visible text */
}

#bookDetailsModal .modal-header {
    border-bottom: none !important;
    background: #ffffff !important; /* ensures visibility */
}

#bookDetailsModal .btn-close {
    filter: invert(0) brightness(0) contrast(200%) !important;
    opacity: 1 !important;
}

#bookDetailsModal .qty-input {
    width: 80px; /* perfect for 3 digits */
    padding: 4px 6px;
    font-size: 0.9rem;
    text-align: center;
}

/* Container */
#bookDetailsModal .format-boxes {
    display: flex !important;
    gap: 12px;
    flex-wrap: wrap;
}

/* Each box */
#bookDetailsModal .format-box {
    border: 2px solid #ccc;
    border-radius: 6px;
    padding: 10px 14px;
    width: 120px;
    cursor: pointer;
    text-align: center;
    background: #fafafa;
    transition: 0.2s ease;
    display: inline-block; /* helps with rendering */
}

    /* Selected box */
    #bookDetailsModal .format-box.selected {
        border-color: #2e7d32;
        background: #e8f5e9;
    }

    /* Hover */
    #bookDetailsModal .format-box:hover {
        border-color: #999;
    }

/* Type label */
#bookDetailsModal .format-type {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* Price label */
#bookDetailsModal .format-price {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 4px;
}

/* PRICE BADGE */
.price-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: #000000; /* #b12704; Amazon red */
    color: #fff;
    padding: 4px 7px;
    font-size: .82rem;
    font-weight: bold;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

/* PRICE BADGE — hover only */
.price-badge {
    opacity: 0;
    transition: opacity .25s ease;
}

