/* ================================================
   SHARE MODAL STYLES
   Professional social sharing component
   ================================================ */

/* Action Buttons Container */
.book-action-buttons {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    /* Break out of 3D perspective/transform context */
    transform-style: flat;
    isolation: isolate;
}

.book-3d-container:hover .book-action-buttons {
    opacity: 1;
    transform: translateX(0);
}

/* Share Button on Cards */
.share-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.share-btn:hover {
    background: #1E7CB8;
    color: white;
    transform: scale(1.1);
}

.share-btn i {
    font-size: 14px;
    color: #1E7CB8;
    transition: color 0.3s ease;
}

.share-btn:hover i {
    color: white;
}

/* Favorite Button on Cards */
.favorite-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.favorite-btn:hover {
    background: #fef2f2;
    transform: scale(1.1);
}

.favorite-btn i {
    font-size: 14px;
    color: #ef4444;
    transition: all 0.3s ease;
}

.favorite-btn.is-favorite {
    background: #fef2f2;
}

.favorite-btn.is-favorite i {
    color: #ef4444;
    animation: heartPulse 0.4s ease;
}

/* Heart pulse animation */
@keyframes heartPulse {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(0.9);
    }

    75% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

/* Loading state for favorite button */
.favorite-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.favorite-btn.loading i {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Stats Bar on Cards */
.book-stats-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 6px 0;
    font-size: 12px;
    color: #6b7280;
}

.book-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.book-stat i {
    font-size: 11px;
    opacity: 0.8;
}

.book-stat-views i {
    color: #3b82f6;
}

.book-stat-reads i {
    color: #10b981;
}

.book-stat-rating i {
    color: #f59e0b;
}

.book-stat-rating .stars {
    display: inline-flex;
    gap: 1px;
}

.book-stat-rating .stars i {
    font-size: 10px;
}

.book-stat-rating .stars .filled {
    color: #f59e0b;
}

.book-stat-rating .stars .empty {
    color: #d1d5db;
}

/* Share Modal Overlay */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.share-modal-overlay.active {
    display: flex;
}

/* Share Modal */
.share-modal {
    background: white;
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.share-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.share-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-modal-close:hover {
    background: #e5e7eb;
}

/* Book Preview in Modal */
.share-modal-preview {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.share-modal-cover {
    width: 80px;
    height: 107px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-modal-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-modal-info {
    flex: 1;
    min-width: 0;
}

.share-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-modal-author {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 8px;
}

.share-modal-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-modal-stars {
    display: flex;
    gap: 2px;
}

.share-modal-stars i {
    font-size: 12px;
}

.share-modal-stars .filled {
    color: #f59e0b;
}

.share-modal-stars .empty {
    color: #d1d5db;
}

.share-modal-rating-text {
    font-size: 12px;
    color: #6b7280;
}

/* Share Options */
.share-modal-options {
    padding: 20px;
}

.share-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background: #f9fafb;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-option-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.share-option-label {
    font-size: 11px;
    font-weight: 500;
    color: #4b5563;
}

/* Social Colors */
.share-option.facebook .share-option-icon {
    background: #1877f2;
}

.share-option.twitter .share-option-icon {
    background: #000000;
}

.share-option.whatsapp .share-option-icon {
    background: #25d366;
}

.share-option.telegram .share-option-icon {
    background: #0088cc;
}

.share-option.linkedin .share-option-icon {
    background: #0077b5;
}

.share-option.email .share-option-icon {
    background: #ea4335;
}

.share-option.native .share-option-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.share-option.copy .share-option-icon {
    background: #6b7280;
}

/* Copy Link Section */
.share-copy-link {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 12px;
}

.share-copy-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    background: white;
    min-width: 0;
}

.share-copy-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.share-copy-btn {
    padding: 10px 20px;
    background: #1E7CB8;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.share-copy-btn:hover {
    background: #165784;
}

.share-copy-btn.copied {
    background: #10b981;
}

/* Detail Page Share Button */
.share-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.share-detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ================================================
   REVIEW SECTION STYLES
   ================================================ */

.review-section {
    margin-top: 32px;
}

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

.review-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.review-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-summary-rating {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.review-summary-stars {
    display: flex;
    gap: 2px;
}

.review-summary-stars i {
    font-size: 18px;
}

.review-summary-stars .filled {
    color: #f59e0b;
}

.review-summary-stars .empty {
    color: #d1d5db;
}

.review-summary-count {
    font-size: 13px;
    color: #6b7280;
}

/* Review Form */
.review-form {
    background: #f9fafb;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.review-form-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px;
}

.star-rating-input {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.star-rating-input label {
    cursor: pointer;
}

.star-rating-input input {
    display: none;
}

.star-rating-input .star {
    font-size: 28px;
    color: #d1d5db;
    transition: all 0.2s ease;
}

.star-rating-input label:hover .star,
.star-rating-input label:hover~label .star,
.star-rating-input input:checked~label .star {
    color: #f59e0b;
}

/* Reverse star logic for proper selection */
.star-rating-input {
    direction: rtl;
    display: flex;
    justify-content: flex-end;
}

.star-rating-input input:checked~.star,
.star-rating-input .star:hover,
.star-rating-input .star:hover~.star {
    color: #f59e0b;
}

.review-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease;
}

.review-textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.review-submit-btn {
    padding: 12px 24px;
    background: #1E7CB8;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
}

.review-submit-btn:hover {
    background: #165784;
}

/* Review List */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.review-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

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

.review-meta {
    flex: 1;
}

.review-author {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.review-date {
    font-size: 12px;
    color: #6b7280;
}

.review-stars {
    display: flex;
    gap: 2px;
}

.review-stars i {
    font-size: 12px;
}

.review-stars .filled {
    color: #f59e0b;
}

.review-stars .empty {
    color: #d1d5db;
}

.review-content {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
}

/* No Reviews State */
.no-reviews {
    text-align: center;
    padding: 32px;
    color: #6b7280;
}

.no-reviews i {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.no-reviews p {
    margin: 0;
    font-size: 14px;
}

/* ================================================
   TOAST NOTIFICATIONS
   ================================================ */

.toast-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: #1f2937;
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification i {
    font-size: 18px;
}

.toast-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.toast-error {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.toast-info {
    background: linear-gradient(135deg, #1E7CB8 0%, #47a7d7 100%);
}