/* 
 * Hadith Chapter Display Plugin - Hadith Card Styles 
 * This is a copy of the original hadith-card-styles.css file, with added prefixes to avoid conflicts.
 * 
 * Note: Featured hadith functionality has been removed from the application.
 * The corresponding CSS has been disabled in styles.css.
 */

/* Unique asymmetric card styling */
.hcd-wrapper .hadith-card {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

/* Slanted background panel */
.hcd-wrapper .hadith-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform: skewY(-2deg) translateZ(-10px);
    transform-origin: top left;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    z-index: -2;
}

/* Colorful accent border */
.hcd-wrapper .hadith-card::after {
    content: '';
    position: absolute;
    left: -4px;
    top: 15px;
    bottom: 15px;
    width: 8px;
    background: linear-gradient(to bottom, #23DE00, #84FF69);
    border-radius: 4px;
    z-index: -1;
    transition: all 0.3s ease;
}

/* Hover effects */
.hcd-wrapper .hadith-card:hover {
    transform: translateY(-10px);
}

.hcd-wrapper .hadith-card:hover::before {
    background: #f7fff0;
    transform: skewY(-2deg) translateZ(-10px) scale(1.03);
    box-shadow: 0 25px 50px rgba(35, 222, 0, 0.2);
}

.hcd-wrapper .hadith-card:hover::after {
    left: -6px;
    width: 12px;
    box-shadow: 0 0 20px rgba(35, 222, 0, 0.4);
}

/* Hadith content with layered design */
.hcd-wrapper .hadith-content {
    padding: 1.5rem 1.3rem 0.8rem 2.2rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    grid-row: 2;
}

/* Hadith number in top left */
.hcd-wrapper .hadith-content::before {
    content: attr(data-hadith-number);
    position: absolute;
    top: -5px;
    left: 20px;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(35, 222, 0, 0.07);
    line-height: 1;
    font-family: var(--font-secondary);
    z-index: -1;
}

/* Hadith container with unique styling */
.hcd-wrapper .hadith-text-container {
    position: relative;
    margin-bottom: 0.8rem;
    padding: 0;
    transform: translateZ(10px);
}

/* Quote styling - modified for single line */
.hcd-wrapper .hadith-text-content {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    line-height: 1.7;
    color: #1a2e13;
    font-style: italic;
    position: relative;
    margin-bottom: 0.3rem;
    padding-left: 1.5rem;
    border-left: 2px dashed rgba(35, 222, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

/* Highlight first letter */
.hcd-wrapper .hadith-text-content::first-letter {
    font-size: 2rem;
    font-weight: 700;
    color: #23DE00;
    font-style: normal;
}

/* Language specific styling */
.hcd-wrapper [lang="ar"] .hadith-text-content {
    font-family: var(--font-arabic);
    line-height: 1.8;
    font-size: 1.4rem;
    direction: rtl;
    text-align: right;
    padding-left: 0;
    padding-right: 1.5rem;
    border-left: none;
    border-right: 2px dashed rgba(35, 222, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hcd-wrapper [lang="ur"] .hadith-text-content {
    font-family: var(--font-arabic);
    line-height: 1.8;
    font-size: 1.35rem;
    direction: rtl;
    text-align: right;
    padding-left: 0;
    padding-right: 1.5rem;
    border-left: none;
    border-right: 2px dashed rgba(35, 222, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hcd-wrapper [lang="bn"] .hadith-text-content {
    font-family: var(--font-bengali);
    line-height: 1.8;
    font-size: 1.3rem;
    padding-left: 1.5rem;
    border-left: 2px dashed rgba(35, 222, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Floating quotation mark */
.hcd-wrapper .hadith-text-container::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: -10px;
    font-size: 6rem;
    line-height: 1;
    font-family: 'Georgia', serif;
    color: rgba(35, 222, 0, 0.15);
    z-index: -1;
}

/* Metadata with modern chip design */
.hcd-wrapper .topic-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: auto;
    grid-row: 3;
    transform: translateZ(15px);
    padding: 0.6rem 0 0.4rem;
    position: relative;
    border-top: 1px dashed rgba(35, 222, 0, 0.1);
}

/* Top row metadata container */
.hcd-wrapper .meta-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Bottom row for reference */
.hcd-wrapper .meta-bottom-row {
    display: flex;
    justify-content: center;
}

/* Narrator and source pills */
.hcd-wrapper .topic-narrator, 
.hcd-wrapper .hadith-source {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.3rem 0.6rem;
    background: transparent;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a2e13;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 45%;
    flex-shrink: 1;
}

/* Special styling for reference */
.hcd-wrapper .hadith-reference {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    background: rgba(35, 222, 0, 0.07);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a2e13;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-top: 0.2rem;
    margin-bottom: 0.3rem;
}

/* Subtle background for pills */
.hcd-wrapper .topic-narrator::before, 
.hcd-wrapper .hadith-source::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(35, 222, 0, 0.05);
    border-radius: 30px;
    z-index: -1;
    transition: all 0.3s ease;
}

/* Pill icons */
.hcd-wrapper .topic-narrator i, 
.hcd-wrapper .hadith-source i, 
.hcd-wrapper .hadith-reference i {
    color: #23DE00;
    font-size: 0.9rem;
}

/* Hover effects for pills */
.hcd-wrapper .topic-narrator:hover, 
.hcd-wrapper .hadith-source:hover {
    transform: translateY(-2px);
}

.hcd-wrapper .hadith-reference:hover {
    background: rgba(35, 222, 0, 0.12);
    transform: translateY(-2px);
}

/* Read more link with stylish design */
.hcd-wrapper .topic-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 600;
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    background: #23DE00;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(35, 222, 0, 0.15);
}

/* Hover effect on link */
.hcd-wrapper .topic-link:hover {
    background: #20c900;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 222, 0, 0.25);
}

.hcd-wrapper .topic-link i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.hcd-wrapper .topic-link:hover i {
    transform: translateX(3px);
}

/* Button container for new dual-button layout */
.button-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Read More button (link) */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
    border: none;
    cursor: pointer;
    flex: 1;
    min-width: 100px;
    justify-content: center;
}

.read-more-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
    text-decoration: none;
    color: white;
}

/* Full View button */
.full-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.3);
    flex: 1;
    min-width: 100px;
    justify-content: center;
}

.full-view-btn:hover {
    background: linear-gradient(135deg, #1B5E20, #0D4E12);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.4);
}

/* Legacy topic-link style for backward compatibility */
.topic-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
    border: none;
    cursor: pointer;
    justify-content: center;
}

.topic-link:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
    text-decoration: none;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .button-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .read-more-btn,
    .full-view-btn {
        width: 100%;
        flex: none;
    }
}

/* Icon animations */
.read-more-btn i,
.full-view-btn i,
.topic-link i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(4px);
}

.full-view-btn:hover i {
    transform: scale(1.1);
}

.topic-link:hover i {
    transform: translateX(4px);
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .hcd-wrapper .hadith-card::before {
        transform: skewY(-1deg) translateZ(-10px);
    }
    
    .hcd-wrapper .hadith-content {
        padding: 2rem 1.2rem 1.2rem 2rem;
    }
    
    .hcd-wrapper .hadith-text-content {
        font-size: 1.2rem;
        line-height: 1.8;
    }
    
    .hcd-wrapper .topic-meta {
        padding: 0.8rem 0 0.5rem;
    }
    
    .hcd-wrapper .meta-top-row {
        justify-content: center;
    }
    
    .hcd-wrapper .topic-narrator, 
    .hcd-wrapper .hadith-source {
        max-width: none;
        flex: 0 1 auto;
    }
    
    .hcd-wrapper .topic-link {
        margin-top: 0.3rem;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .hcd-wrapper .hadith-card::before {
        background: #1a2e13;
    }
    
    .hcd-wrapper .hadith-card:hover::before {
        background: #213a1a;
    }
    
    .hcd-wrapper .hadith-content::before {
        color: rgba(35, 222, 0, 0.1);
    }
    
    .hcd-wrapper .hadith-text-content {
        color: #e0ffdb;
        border-left-color: rgba(35, 222, 0, 0.4);
    }
    
    .hcd-wrapper [lang="ar"] .hadith-text-content,
    .hcd-wrapper [lang="ur"] .hadith-text-content {
        border-right-color: rgba(35, 222, 0, 0.4);
    }
    
    .hcd-wrapper .topic-narrator, 
    .hcd-wrapper .hadith-source, 
    .hcd-wrapper .hadith-reference {
        color: #d4ffcc;
    }
} 

/* Error message styles */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    border-left: 5px solid #f5c6cb;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Toast notification for errors */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    max-width: 350px;
    transform: translateY(-100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.error-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.error-toast.warning {
    background-color: #fff3cd;
    color: #856404;
}

.error-toast.success {
    background-color: #d4edda;
    color: #155724;
}

/* Improve hadith modal */
.hadith-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hadith-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title-container {
    display: flex;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 20px;
}

.hadith-full-text {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
}

.hadith-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.hadith-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.meta-item i {
    margin-right: 8px;
    color: #23DE00;
}

.language-options {
    margin-bottom: 20px;
}

.language-options h4 {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #555;
}

.language-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lang-option {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-option.active {
    background-color: #23DE00;
    color: white;
    border-color: #23DE00;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.action-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background-color: #f5f5f5;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.action-btn i {
    margin-right: 6px;
}

.action-btn:hover {
    background-color: #e0e0e0;
}

/* Authentication badges */
.authenticity-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-left: 10px;
}

.authenticity-badge.sahih {
    background-color: rgba(35, 222, 0, 0.2);
    color: #17a300;
    border: 1px solid rgba(35, 222, 0, 0.5);
}

.authenticity-badge.hassan {
    background-color: rgba(255, 184, 0, 0.2);
    color: #cc7c00;
    border: 1px solid rgba(255, 184, 0, 0.5);
}

.authenticity-badge.daif {
    background-color: rgba(255, 69, 0, 0.2);
    color: #cc2900;
    border: 1px solid rgba(255, 69, 0, 0.5);
}

.authenticity-badge.mawdu {
    background-color: rgba(255, 0, 0, 0.2);
    color: #cc0000;
    border: 1px solid rgba(255, 0, 0, 0.5);
}

/* Improve view modes */
.hadiths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.hadiths-grid.list-view {
    grid-template-columns: 1fr;
}

.hadiths-grid.masonry-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* RTL support */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .hadith-text-container {
    text-align: right;
}

.rtl .quote-icon-small {
    left: auto;
    right: 10px;
}

/* Enhance hadith cards */
.topic-card {
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hadith-content {
    padding: 20px;
    position: relative;
}

.hadith-text-container {
    position: relative;
    padding-left: 25px;
}

.rtl .hadith-text-container {
    padding-left: 0;
    padding-right: 25px;
}

.quote-icon-small {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 18px;
    color: #23DE00;
    opacity: 0.5;
}

.topic-meta {
    padding: 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.topic-narrator, .hadith-source {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
}

.topic-narrator i, .hadith-source i {
    margin-right: 5px;
    color: #23DE00;
}

.topic-link {
    text-decoration: none;
    color: #23DE00;
    font-weight: bold;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.topic-link i {
    margin-left: 5px;
    transition: transform 0.2s;
}

.topic-link:hover {
    color: #1db100;
}

.topic-link:hover i {
    transform: translateX(3px);
}

/* Improved pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 5px;
}

.pagination-btn {
    background: none;
    border: 1px solid #ddd;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f5f5f5;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.page-number:hover {
    background-color: #f5f5f5;
}

.page-number.active {
    background-color: #23DE00;
    color: white;
}

/* Add mobile media query for hadith cards */
@media (max-width: 480px) {
    .hcd-wrapper .hadith-card::before {
        transform: skewY(-1deg) translateZ(-10px);
    }
    
    .hcd-wrapper .hadith-content {
        padding: 1.2rem 1.1rem 0.6rem 1.8rem;
    }
    
    .hcd-wrapper .hadith-text-content {
        font-size: 1.1rem;
        line-height: 1.6;
        -webkit-line-clamp: 2;
    }
    
    .hcd-wrapper .topic-meta {
        padding: 0.5rem 0 0.3rem;
        gap: 0.2rem;
    }
    
    .hcd-wrapper .topic-narrator, 
    .hcd-wrapper .hadith-source {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        max-width: 45%;
    }
    
    .hcd-wrapper .topic-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
} 