/* Print Styles for Kora24 Theme */

@media print {
    /* Reset and Base */
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        font-family: 'Times New Roman', serif;
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
        margin: 0;
        padding: 0;
    }
    
    /* Hide unnecessary elements */
    .header,
    .navbar,
    .nav-menu,
    .nav-toggle,
    .search-form,
    .sidebar,
    .sidebar-column,
    .footer,
    .social-links,
    .share-buttons,
    .video-actions,
    .match-actions,
    .article-actions,
    .comment-form,
    .load-more-btn,
    .pagination,
    .breadcrumb,
    .tabs-nav,
    .tab-btn,
    .dropdown-toggle,
    .dropdown-menu,
    .play-button,
    .play-overlay,
    .watch-btn,
    .watch-live-btn,
    .action-btn,
    .filter-buttons,
    .date-navigation,
    .live-indicator,
    .viewers-count,
    .quality-badge,
    .featured-badge,
    .video-player,
    .video-embed,
    .stream-thumbnail,
    .video-thumbnail,
    .news-image,
    .article-featured-image,
    .gallery-grid,
    .ad-widget,
    .newsletter-widget,
    .no-print {
        display: none !important;
    }
    
    /* Page Layout */
    .container {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .content-wrapper {
        display: block;
        width: 100%;
    }
    
    .main-column {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* Typography */
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid;
        font-weight: bold;
        margin-top: 1em;
        margin-bottom: 0.5em;
    }
    
    h1 {
        font-size: 18pt;
        border-bottom: 2px solid black;
        padding-bottom: 0.2em;
    }
    
    h2 {
        font-size: 16pt;
        border-bottom: 1px solid black;
        padding-bottom: 0.1em;
    }
    
    h3 {
        font-size: 14pt;
    }
    
    h4 {
        font-size: 12pt;
    }
    
    p {
        margin: 0.5em 0;
        orphans: 3;
        widows: 3;
    }
    
    /* Links */
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
    
    a[href^="#"]:after,
    a[href^="javascript:"]:after,
    a[href^="mailto:"]:after,
    a[href^="tel:"]:after {
        content: "";
    }
    
    /* Article Content */
    .article-main {
        width: 100%;
        padding: 0;
        margin: 0;
        box-shadow: none;
        border: none;
    }
    
    .article-header {
        border-bottom: 2px solid black;
        padding-bottom: 1em;
        margin-bottom: 1em;
    }
    
    .article-title {
        font-size: 20pt;
        font-weight: bold;
        margin-bottom: 0.5em;
        color: black !important;
    }
    
    .article-meta {
        font-size: 10pt;
        color: #666 !important;
        margin-bottom: 1em;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.6;
        color: black !important;
    }
    
    .article-content img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    /* Match Details */
    .match-info-card {
        border: 2px solid black;
        padding: 1em;
        margin-bottom: 1em;
        page-break-inside: avoid;
    }
    
    .match-main-info {
        display: block;
        text-align: center;
    }
    
    .team {
        display: inline-block;
        margin: 0 1em;
        text-align: center;
    }
    
    .team-name {
        font-weight: bold;
        font-size: 14pt;
    }
    
    .score-display {
        font-size: 24pt;
        font-weight: bold;
        margin: 0.5em 0;
    }
    
    .match-status {
        font-size: 12pt;
        font-weight: bold;
        text-transform: uppercase;
    }
    
    /* Tab Content */
    .tab-content {
        width: 100%;
        padding: 0;
        margin: 0;
        box-shadow: none;
        border: none;
    }
    
    .tab-panel {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        page-break-inside: avoid;
        margin-bottom: 2em;
        border-bottom: 1px solid #ccc;
        padding-bottom: 1em;
    }
    
    .tab-panel:not(:first-child) {
        page-break-before: always;
    }
    
    .tab-panel h3 {
        font-size: 16pt;
        font-weight: bold;
        margin-bottom: 1em;
        border-bottom: 1px solid black;
        padding-bottom: 0.2em;
    }
    
    /* Tables */
    table {
        border-collapse: collapse;
        width: 100%;
        margin: 1em 0;
        page-break-inside: avoid;
    }
    
    th, td {
        border: 1px solid black;
        padding: 0.3em;
        text-align: right;
    }
    
    th {
        background: #f0f0f0 !important;
        font-weight: bold;
    }
    
    /* Lists */
    ul, ol {
        margin: 0.5em 0;
        padding-right: 2em;
    }
    
    li {
        margin: 0.2em 0;
    }
    
    /* Match Cards */
    .match-card {
        border: 1px solid black;
        padding: 0.5em;
        margin-bottom: 0.5em;
        page-break-inside: avoid;
    }
    
    .match-teams {
        display: block;
        text-align: center;
    }
    
    .match-time {
        font-weight: bold;
        text-align: center;
        margin-bottom: 0.5em;
    }
    
    /* News Cards */
    .news-card {
        border: 1px solid #ccc;
        padding: 1em;
        margin-bottom: 1em;
        page-break-inside: avoid;
    }
    
    .news-content h3 {
        font-size: 14pt;
        font-weight: bold;
        margin-bottom: 0.5em;
    }
    
    .news-meta {
        font-size: 10pt;
        color: #666 !important;
        margin-top: 0.5em;
    }
    
    /* Video Cards */
    .video-card {
        border: 1px solid #ccc;
        padding: 1em;
        margin-bottom: 1em;
        page-break-inside: avoid;
    }
    
    .video-info h3 {
        font-size: 14pt;
        font-weight: bold;
        margin-bottom: 0.5em;
    }
    
    .video-description {
        font-size: 11pt;
        margin-bottom: 0.5em;
    }
    
    .video-meta {
        font-size: 10pt;
        color: #666 !important;
    }
    
    /* Comments */
    .comments-section {
        border-top: 2px solid black;
        padding-top: 1em;
        margin-top: 2em;
    }
    
    .comment-item {
        border: 1px solid #ccc;
        padding: 0.5em;
        margin-bottom: 0.5em;
        page-break-inside: avoid;
    }
    
    .comment-author {
        font-weight: bold;
        margin-bottom: 0.3em;
    }
    
    .comment-date {
        font-size: 10pt;
        color: #666 !important;
    }
    
    .comment-text {
        margin: 0.5em 0;
    }
    
    /* Statistics */
    .stats-comparison {
        width: 100%;
        margin: 1em 0;
    }
    
    .stat-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.3em 0;
        border-bottom: 1px solid #ccc;
    }
    
    .stat-name {
        font-weight: bold;
        flex: 1;
        text-align: center;
    }
    
    .home-stat,
    .away-stat {
        font-weight: bold;
        width: 3em;
        text-align: center;
    }
    
    /* Timeline */
    .timeline-event {
        border: 1px solid #ccc;
        padding: 0.5em;
        margin-bottom: 0.5em;
        page-break-inside: avoid;
    }
    
    .event-time {
        font-weight: bold;
        margin-bottom: 0.3em;
    }
    
    .event-details {
        margin-bottom: 0.3em;
    }
    
    /* Formations */
    .formations {
        display: block;
    }
    
    .team-formation {
        border: 1px solid black;
        padding: 1em;
        margin-bottom: 1em;
        page-break-inside: avoid;
    }
    
    .team-formation h4 {
        font-size: 14pt;
        font-weight: bold;
        text-align: center;
        margin-bottom: 1em;
    }
    
    .formation-line {
        text-align: center;
        margin-bottom: 0.5em;
    }
    
    .player {
        display: inline-block;
        margin: 0 0.2em;
        padding: 0.2em 0.4em;
        border: 1px solid black;
        font-size: 10pt;
    }
    
    /* Page Breaks */
    .page-break {
        page-break-before: always;
    }
    
    .avoid-break {
        page-break-inside: avoid;
    }
    
    /* Header for each page */
    @page {
        margin: 2cm;
        
        @top-center {
            content: "كورة 24 - " attr(title);
            font-size: 10pt;
            color: #666;
        }
        
        @bottom-center {
            content: "صفحة " counter(page) " من " counter(pages);
            font-size: 10pt;
            color: #666;
        }
    }
    
    /* First page header */
    @page :first {
        @top-center {
            content: "";
        }
    }
    
    /* Print-specific utilities */
    .print-only {
        display: block !important;
    }
    
    .screen-only {
        display: none !important;
    }
    
    /* QR Code for URL */
    .print-url::after {
        content: "\A الرابط: " attr(data-url);
        white-space: pre;
        font-size: 10pt;
        color: #666;
        margin-top: 1em;
        display: block;
        border-top: 1px solid #ccc;
        padding-top: 0.5em;
    }
    
    /* Print date */
    .print-date::before {
        content: "تاريخ الطباعة: ";
        font-weight: bold;
    }
    
    /* Abbreviations */
    abbr[title]:after {
        content: " (" attr(title) ")";
        font-size: 10pt;
        color: #666;
    }
    
    /* Blockquotes */
    blockquote {
        border-right: 3px solid black;
        padding-right: 1em;
        margin: 1em 0;
        font-style: italic;
        page-break-inside: avoid;
    }
    
    /* Code blocks */
    pre, code {
        font-family: 'Courier New', monospace;
        font-size: 10pt;
        border: 1px solid #ccc;
        padding: 0.5em;
        background: #f9f9f9 !important;
        page-break-inside: avoid;
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    /* Forms (if any need to be printed) */
    input, textarea, select {
        border: 1px solid black;
        padding: 0.2em;
        background: white !important;
    }
    
    /* Emphasis */
    strong, b {
        font-weight: bold;
    }
    
    em, i {
        font-style: italic;
    }
    
    /* RTL Support for Print */
    body {
        direction: rtl;
        text-align: right;
    }
    
    .ltr {
        direction: ltr;
        text-align: left;
    }
    
    /* Score and numbers should remain LTR */
    .score-display,
    .live-score,
    .match-score .score,
    .time,
    .match-time .time {
        direction: ltr;
        text-align: center;
    }
}

/* Print button styles (for screen) */
@media screen {
    .print-btn {
        background: var(--primary-green);
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: var(--border-radius);
        cursor: pointer;
        transition: var(--transition);
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
        margin: 1rem 0;
    }
    
    .print-btn:hover {
        background: var(--dark-green);
        transform: translateY(-2px);
    }
    
    .print-btn i {
        font-size: 1rem;
    }
}
