/**
 * Book Time - Frontend Styles
 */

/* Consultation Cards Grid */
.book-time-consultations {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.book-time-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.book-time-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.book-time-card-image {
    position: relative;
    padding-top: 60%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.book-time-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-time-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-time-card-title {
    margin: 0 0 10px;
    font-size: 1.25em;
    font-weight: 600;
    color: #2c3e50;
}

.book-time-card-price {
    font-size: 1.5em;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 10px;
}

.book-time-card-rating {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.book-time-card-rating .review-count {
    font-size: 0.875em;
    color: #666;
}

.book-time-card-description {
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.book-time-card-button {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    background: #2c3e50;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease;
    box-sizing: border-box;
}

.book-time-card-button:hover {
    background: #1a252f;
    color: #fff;
}

/* Star Rating */
.book-time-stars {
    color: #f39c12;
    font-size: 1em;
    letter-spacing: 2px;
}

.book-time-stars .star-empty {
    color: #ddd;
}

.book-time-stars .rating-number {
    color: #666;
    font-size: 0.9em;
    letter-spacing: 0;
    margin-left: 5px;
}

/* ======================================
   DETAIL PAGE STYLES
   ====================================== */

.book-time-detail-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 40px 0;
}

.book-time-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.book-time-breadcrumb {
    margin-bottom: 30px;
    font-size: 0.9em;
    color: #666;
}

.book-time-breadcrumb a {
    color: #2c3e50;
    text-decoration: none;
}

.book-time-breadcrumb a:hover {
    text-decoration: underline;
}

.book-time-breadcrumb .separator {
    margin: 0 10px;
    color: #ccc;
}

/* Main Product Section */
.book-time-detail-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.book-time-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.book-time-detail-image-placeholder {
    width: 100%;
    padding-top: 75%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.book-time-detail-title {
    margin: 0 0 15px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.book-time-detail-price-rating {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.book-time-detail-price {
    font-size: 2em;
    font-weight: 700;
    color: #27ae60;
}

.book-time-detail-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.book-time-detail-rating .review-link {
    color: #666;
    font-size: 0.9em;
    text-decoration: none;
}

.book-time-detail-rating .review-link:hover {
    text-decoration: underline;
}

.book-time-detail-short-desc {
    color: #555;
    font-size: 1.05em;
    line-height: 1.7;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* Book Now Button */
.book-time-detail-actions {
    margin-top: 20px;
}

.book-time-book-now-btn {
    width: 100%;
    padding: 18px 32px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.book-time-book-now-btn:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.book-time-detail-actions .book-time-secure-note {
    margin-top: 15px;
}

/* ======================================
   CHECKOUT MODAL
   ====================================== */

.book-time-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.book-time-modal.is-open {
    display: block;
}

.book-time-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.book-time-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    padding: 20px;
    box-sizing: border-box;
}

.book-time-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    max-height: calc(90vh - 40px);
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-time-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    transition: color 0.2s ease;
}

.book-time-modal-close:hover {
    color: #333;
}

.book-time-modal-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.book-time-modal-header h3 {
    margin: 0 0 10px;
    font-size: 1.4em;
    color: #2c3e50;
}

.book-time-modal-price {
    font-size: 1.8em;
    font-weight: 700;
    color: #27ae60;
}

.book-time-modal .book-time-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
}

.book-time-modal .book-time-form-group input,
.book-time-modal .book-time-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.book-time-modal .book-time-form-group input:focus,
.book-time-modal .book-time-form-group textarea:focus {
    outline: none;
    border-color: #2c3e50;
}

.book-time-modal .book-time-form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.book-time-modal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin: 15px 0;
    border-top: 2px solid #e0e0e0;
    border-bottom: 2px solid #e0e0e0;
}

.book-time-modal-total .label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.book-time-modal-submit {
    width: 100%;
    padding: 16px 24px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.book-time-modal-submit:hover {
    background: #219a52;
}

.book-time-modal-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.book-time-modal .book-time-secure-note {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
    color: #666;
    font-size: 0.85em;
}

.book-time-modal .book-time-form-group.has-error input,
.book-time-modal .book-time-form-group.has-error textarea {
    border-color: #e74c3c;
}

.book-time-modal .book-time-form-error {
    color: #e74c3c;
    font-size: 0.85em;
    margin-top: 5px;
}

.book-time-modal .book-time-alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.book-time-modal .book-time-alert-error {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Body scroll lock when modal is open */
body.book-time-modal-open {
    overflow: hidden;
}

/* Detail Page Checkout Form (legacy - keeping for shortcode) */
.book-time-detail-checkout {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
}

.book-time-form-row {
    margin-bottom: 15px;
}

.book-time-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.book-time-detail-checkout .book-time-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
}

.book-time-detail-checkout .book-time-form-group input,
.book-time-detail-checkout .book-time-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.book-time-detail-checkout .book-time-form-group input:focus,
.book-time-detail-checkout .book-time-form-group textarea:focus {
    outline: none;
    border-color: #2c3e50;
}

.book-time-detail-checkout .book-time-form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.book-time-detail-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin: 15px 0;
    border-top: 2px solid #e0e0e0;
    border-bottom: 2px solid #e0e0e0;
}

.book-time-detail-total .label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.book-time-detail-submit {
    width: 100%;
    padding: 16px 24px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.book-time-detail-submit:hover {
    background: #219a52;
}

.book-time-detail-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.book-time-detail-checkout .book-time-secure-note {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 0.85em;
}

/* Full Description */
.book-time-detail-description {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.book-time-detail-description h2 {
    margin: 0 0 25px;
    font-size: 1.5em;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.book-time-detail-content {
    color: #555;
    line-height: 1.8;
    font-size: 1.05em;
}

.book-time-detail-content h3 {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 1.5em 0 0.75em;
}

.book-time-detail-content p {
    margin-bottom: 1em;
}

.book-time-detail-content ul,
.book-time-detail-content ol {
    margin-bottom: 1em;
    padding-left: 25px;
}

.book-time-detail-content li {
    margin-bottom: 0.5em;
}

/* Related Products */
.book-time-related {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.book-time-related h2 {
    margin: 0 0 25px;
    font-size: 1.5em;
    color: #2c3e50;
}

.book-time-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.book-time-related-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: box-shadow 0.3s ease;
}

.book-time-related-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.book-time-related-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.book-time-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-time-related-info h3 {
    margin: 0 0 8px;
    font-size: 1em;
}

.book-time-related-info h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.book-time-related-info h3 a:hover {
    color: #27ae60;
}

.book-time-related-price {
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 5px;
}

/* Reviews Section */
.book-time-reviews-section {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.book-time-reviews-section h2 {
    margin: 0 0 30px;
    font-size: 1.5em;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.book-time-reviews-section .review-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.6em;
    font-weight: 400;
}

.book-time-reviews-section .total-reviews {
    color: #666;
}

.book-time-no-reviews {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.book-time-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.book-time-review {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
}

.book-time-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.book-time-review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.book-time-review-author .author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1em;
}

.book-time-review-author .author-name {
    font-weight: 600;
    color: #2c3e50;
}

.book-time-review-content {
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

.book-time-review-date {
    font-size: 0.85em;
    color: #999;
}

/* ======================================
   STANDALONE CHECKOUT FORM (SHORTCODE)
   ====================================== */

.book-time-checkout {
    max-width: 600px;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.book-time-checkout-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.book-time-checkout-title {
    margin: 0 0 10px;
    font-size: 1.5em;
    color: #2c3e50;
}

.book-time-checkout-price {
    font-size: 2em;
    font-weight: 700;
    color: #27ae60;
}

.book-time-checkout-price small {
    font-size: 0.5em;
    color: #666;
    font-weight: 400;
}

.book-time-form-group {
    margin-bottom: 20px;
}

.book-time-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.book-time-form-group label .required {
    color: #e74c3c;
}

.book-time-form-group input,
.book-time-form-group textarea,
.book-time-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.book-time-form-group input:focus,
.book-time-form-group textarea:focus,
.book-time-form-group select:focus {
    outline: none;
    border-color: #2c3e50;
}

.book-time-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.book-time-form-group.has-error input,
.book-time-form-group.has-error textarea {
    border-color: #e74c3c;
}

.book-time-form-error {
    color: #e74c3c;
    font-size: 0.875em;
    margin-top: 5px;
}

.book-time-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.book-time-quantity-wrapper input {
    width: 100px;
    text-align: center;
}

.book-time-total {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.book-time-total-label {
    font-weight: 600;
    color: #2c3e50;
}

.book-time-total-amount {
    font-size: 1.5em;
    font-weight: 700;
    color: #27ae60;
}

.book-time-submit {
    width: 100%;
    padding: 16px 24px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.book-time-submit:hover {
    background: #219a52;
}

.book-time-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.book-time-secure-note {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.875em;
}

.book-time-secure-note svg {
    vertical-align: middle;
    margin-right: 5px;
}

/* Messages */
.book-time-error,
.book-time-no-consultations {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
}

.book-time-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.book-time-alert-error {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ======================================
   RESPONSIVE STYLES
   ====================================== */

@media screen and (max-width: 900px) {
    .book-time-consultations {
        grid-template-columns: repeat(2, 1fr);
    }

    .book-time-detail-main {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
}

@media screen and (max-width: 600px) {
    .book-time-consultations {
        grid-template-columns: 1fr;
    }

    .book-time-checkout {
        padding: 25px;
        margin: 20px 10px;
    }

    .book-time-checkout-price {
        font-size: 1.5em;
    }

    .book-time-detail-page {
        padding: 20px 0;
    }

    .book-time-detail-container {
        padding: 0 15px;
    }

    .book-time-detail-main {
        padding: 20px;
    }

    .book-time-detail-title {
        font-size: 1.5em;
    }

    .book-time-detail-price {
        font-size: 1.5em;
    }

    .book-time-detail-price-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .book-time-form-row-half {
        grid-template-columns: 1fr;
    }

    .book-time-detail-description,
    .book-time-related,
    .book-time-reviews-section {
        padding: 25px;
    }

    .book-time-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .book-time-related-item {
        flex-direction: column;
    }

    .book-time-related-image {
        width: 100%;
        height: 150px;
    }

    /* Modal responsive */
    .book-time-modal-container {
        padding: 10px;
        max-height: 100vh;
    }

    .book-time-modal-content {
        padding: 20px;
        border-radius: 12px;
        max-height: calc(100vh - 20px);
    }

    .book-time-modal-header h3 {
        font-size: 1.2em;
    }

    .book-time-modal-price {
        font-size: 1.5em;
    }
}
