/* Page styles of resources/views/frontend/quotes/show.blade.php (moved out of the view) */

/* Original-language text (Latin script): a serif face reads better than the Arabic UI font */
.original-quote-text {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 46rem;
    margin-inline: auto;
}
/* تأثيرات الحركة */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

.bounce-animation {
    animation: bounce 0.5s ease;
}

.shake {
    animation: shake 0.5s ease;
}

.new-comment {
    animation: fadeIn 0.5s ease-out;
    border-left: 3px solid #1066E7 !important;
    background-color: rgba(16, 102, 231, 0.05);
}

/* زر تحميل المزيد */
#loadMoreCommentsBtn {
    transition: all 0.3s ease;
}

#loadMoreCommentsBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#loadMoreCommentsBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* تحسينات للاستجابة */
@media (max-width: 768px) {
    .quote-content {
        font-size: 1.25rem !important;
        line-height: 1.6;
    }

    .card-body {
        padding: 1rem !important;
    }

    .quote-stats .stat-item {
        padding: 8px;
    }

    .quote-stats i {
        font-size: 1.5rem !important;
    }

    .action-buttons .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }

    #commentContent {
        font-size: 0.95rem;
        padding: 0.75rem;
    }

    .comment-item {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }

    .comment-item .flex-shrink-0 img,
    .comment-item .flex-shrink-0 div {
        width: 40px !important;
        height: 40px !important;
    }

    .comment-item h6 {
        font-size: 0.95rem;
    }

    .comment-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .replies-container {
        padding-left: 0.5rem !important;
        margin-left: 0.5rem;
    }
}

@media (max-width: 576px) {
    .quote-icon i {
        font-size: 2rem !important;
    }

    .quote-content {
        font-size: 1.1rem !important;
    }

    .card-body {
        padding: 0.75rem !important;
    }

    .quote-stats .col-4 {
        padding: 0 0.25rem;
    }

    .quote-stats i {
        font-size: 1.25rem !important;
    }

    .quote-stats small {
        font-size: 0.75rem;
    }

    .action-buttons {
        gap: 0.5rem !important;
    }

    /* Two per row, never squeezed (min-width: 0 put all five on one line, the labels broken over 3 lines):
       same rule as the proverb page */
    .action-buttons .btn {
        flex: 1 1 120px;
        min-width: 120px;
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    #commentsSection .card-body {
        padding: 0 !important;
    }

    .add-comment {
        padding: 0.75rem !important;
    }

    .comments-list {
        padding: 0.75rem !important;
    }

    #addCommentForm .btn {
        width: 100%;
        justify-content: center;
    }

    #addCommentForm .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    #replyTo {
        width: 100%;
    }

    .comment-item {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .comment-item .d-flex.flex-md-row {
        flex-direction: column;
    }

    .comment-item .flex-shrink-0 {
        margin-bottom: 0.5rem;
        margin-right: 0 !important;
    }

    .comment-item .flex-shrink-0 img,
    .comment-item .flex-shrink-0 div {
        width: 35px !important;
        height: 35px !important;
    }

    .comment-item .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
    }

    .comment-item .btn-link {
        padding: 0.25rem !important;
        min-height: 36px;
        min-width: 36px;
    }

    .comment-actions .btn-link {
        font-size: 0.8rem;
    }

    .dropdown-menu.show {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        max-height: 60vh;
        overflow-y: auto;
        border-radius: 12px 12px 0 0 !important;
        margin: 0 !important;
        transform: none !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
    }

    #noCommentsMessage i {
        font-size: 2rem !important;
    }

    #noCommentsMessage h6 {
        font-size: 0.95rem;
    }

    #noCommentsMessage p {
        font-size: 0.85rem;
    }

    .sidebar .card {
        margin-bottom: 0.75rem !important;
    }

    .sidebar .card-body {
        padding: 0.75rem !important;
    }

    .sidebar .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
}

@media (max-width: 380px) {
    .quote-content {
        font-size: 1rem !important;
    }

    .action-buttons .btn {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }

    .comment-item {
        font-size: 0.85rem;
    }

    .comment-content p {
        font-size: 0.85rem;
    }

    .comment-actions .btn-link {
        font-size: 0.75rem;
    }
}

/* تحسين إمكانية الوصول */
.btn:focus,
.form-control:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 102, 231, 0.25);
}

/* تحسينات أزرار التعليقات */
.comment-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.comment-actions .btn-link {
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.comment-actions .btn-link:hover {
    background-color: rgba(108, 117, 125, 0.1);
    color: #495057;
}

.comment-actions .btn-link.text-primary:hover {
    background-color: rgba(16, 102, 231, 0.1);
}

.comment-actions .btn-link.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}
