/* Print-Friendly Styles for The Cloud & AI Summit */
/* This file contains all print-specific styles */
/* Note: .print-header is hidden on screen via site.css */

@media print {
    /* ========================================================================
       PAGE SETUP
       ======================================================================== */
    @page {
        margin: 0.75in;
    }

    /* ========================================================================
       PRINT HEADER - Conference Branding
       ======================================================================== */
    .print-header {
        display: flex !important;
        align-items: center;
        gap: 1rem;
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
        border-bottom: 2px solid #1a365d;
    }

    .print-logo {
        width: 50px;
        height: auto;
    }

    .print-header-info {
        flex: 1;
    }

    .print-header-title {
        font-family: var(--font-heading);
        font-size: 14pt;
        font-weight: bold;
        color: #1a365d;
    }

    .print-header-details {
        font-size: 10pt;
        color: #555;
    }

    .print-separator {
        margin: 0 0.5rem;
    }

    /* ========================================================================
       HIDE NON-PRINT ELEMENTS
       ======================================================================== */
    .site-header,
    .site-footer,
    #back-to-top,
    #back-to-top-wrapper,
    .cookie-consent-banner,
    .cookie-preferences-modal,
    .skip-link,
    .view-toggle,
    .filter-bar,
    .filter-section,
    .search-controls,
    .btn,
    .hero-section,
    .page-hero,
    .day-filter-row,
    .results-bar,
    .group-toggle,
    .back-link,
    .breadcrumb,
    .agenda-tabs,
    .scroll-hint,
    .speaker-card-social,
    .speaker-social-btn {
        display: none !important;
    }

    /* ========================================================================
       BASE TYPOGRAPHY
       ======================================================================== */
    body {
        font-size: 11pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }

    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    h4 { font-size: 12pt; }

    p {
        orphans: 3;
        widows: 3;
    }

    /* ========================================================================
       REMOVE SHADOWS, TRANSITIONS, DECORATIVE BACKGROUNDS
       ======================================================================== */
    * {
        text-shadow: none !important;
        box-shadow: none !important;
        transition: none !important;
    }

    /* Remove background colors from sections */
    .section-light,
    .section-dark,
    .section-primary,
    .section {
        background: transparent !important;
        background-image: none !important;
    }

    /* ========================================================================
       LINKS - Show URLs for external links
       ======================================================================== */
    a {
        color: #000;
        text-decoration: underline;
    }

    /* Show URL after external links */
    a[href^="http"]:not(.print-no-url):after,
    a[href^="mailto"]:after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        font-weight: normal;
        word-break: break-all;
    }

    /* Don't show URL for internal links and navigation */
    a[href^="/"]:after,
    a[href^="#"]:after,
    nav a:after,
    .btn:after,
    .session-card-content:after,
    .track-session-title-link:after,
    .flat-list-title-link:after,
    .speaker-mini:after,
    .track-speaker-link:after,
    .track-session-arrow-link:after,
    .session-card-mini:after,
    .speaker-card-link:after,
    .speaker-list-item:after {
        content: none;
    }

    /* ========================================================================
       PAGE BREAK CONTROL
       ======================================================================== */
    /* Individual items should avoid page breaks, but NOT containers like time-slot-group
       which would push entire groups to next page leaving blank space */
    .session-card,
    .speaker-card,
    .card,
    .track-session-item,
    .flat-list-item,
    .session-detail-content,
    .speaker-detail-content,
    .speaker-list-item,
    .agenda-card-wrapper {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Time slot groups CAN break across pages to prevent blank first pages */
    .time-slot-group {
        break-inside: auto;
        page-break-inside: auto;
    }

    /* ========================================================================
       LAYOUT ADJUSTMENTS
       ======================================================================== */
    .container {
        max-width: 100%;
        padding: 0;
    }

    .section {
        padding: 1rem 0;
    }

    /* ========================================================================
       IMAGES
       ======================================================================== */
    img {
        max-width: 100% !important;
    }

    .speaker-photo,
    .speaker-avatar,
    .speaker-img {
        width: 80px !important;
        height: 80px !important;
    }

    /* ========================================================================
       USER STORY 1: SESSIONS LIST
       ======================================================================== */

    /* Force flat list view layout for sessions (most compact for printing) */
    #cardView,
    #trackView {
        display: none !important;
    }

    #flatListView {
        display: block !important;
    }

    /* Session card styles for print */
    .session-card {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 0;
        padding: 1rem;
        margin-bottom: 0.5rem;
    }

    .session-card:hover {
        transform: none;
    }

    .session-title {
        font-size: 12pt;
        color: #000;
        margin-bottom: 0.5rem;
    }

    .session-description {
        font-size: 10pt;
        color: #333;
    }

    /* Track badges - preserve color with fallback border */
    .track-badge,
    .track-badge-small,
    .track-badge-large,
    .session-track {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        border: 1px solid currentColor;
        font-size: 9pt;
        padding: 0.2rem 0.5rem;
    }

    /* Flat list view print styles */
    .flat-list-container {
        border: none;
        box-shadow: none;
    }

    .flat-list-item {
        padding: 0.75rem 0;
        border-bottom: 1px solid #ddd;
    }

    .flat-list-item:last-child {
        border-bottom: none;
    }

    .flat-list-title {
        font-size: 11pt;
        color: #000;
    }

    .flat-list-schedule,
    .flat-list-level {
        font-size: 9pt;
        color: #333;
    }

    .flat-list-speakers {
        margin-top: 0.25rem;
    }

    /* Hide arrow icons in print */
    .track-session-arrow,
    .track-session-arrow-link,
    .speaker-list-arrow {
        display: none !important;
    }

    /* Speaker info in session list */
    .track-speaker-avatar,
    .track-speaker-placeholder {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
    }

    .track-speaker-name {
        font-size: 9pt;
    }

    .track-speaker-company {
        font-size: 8pt;
    }

    /* ========================================================================
       USER STORY 2: AGENDA
       ======================================================================== */

    /* Hide grid view, show list view for agenda */
    #gridView.agenda-view {
        display: none !important;
    }

    #listView.agenda-view {
        display: block !important;
    }

    /* Agenda section styling */
    .agenda-section {
        padding: 0;
    }

    /* Time slot group print styles */
    .time-slot-group {
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        border-radius: 0;
    }

    .time-slot-header {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 0.5rem 1rem;
        border-bottom: 1px solid #ddd;
    }

    .time-range {
        font-size: 11pt;
        font-weight: bold;
        color: #000;
    }

    .service-label {
        font-size: 10pt;
        color: #333;
    }

    /* Session card mini styles for agenda */
    .session-card-mini {
        background: #fff;
        border: 1px solid #ddd;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .session-card-mini:hover {
        transform: none;
        background: #fff;
    }

    .session-card-mini .session-title {
        font-size: 10pt;
        color: #000;
    }

    .session-card-mini .session-speaker {
        font-size: 9pt;
        color: #333;
    }

    .session-card-mini.service {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Agenda grid print styles (if grid view is shown) */
    .agenda-grid-wrapper {
        overflow: visible;
    }

    .agenda-grid {
        border: 1px solid #333;
        border-radius: 0;
    }

    .agenda-cell {
        border: 1px solid #ddd;
        padding: 0.5rem;
    }

    .agenda-header-cell {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color: #000;
    }

    .time-cell {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .time-display {
        font-size: 9pt;
        color: #000;
    }

    .time-end {
        font-size: 8pt;
        color: #333;
    }

    .room-header {
        font-weight: bold;
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* ========================================================================
       USER STORY 3: SESSION DETAIL
       ======================================================================== */

    /* Session detail print styles */
    .session-detail-header {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #ddd;
    }

    .session-detail-title {
        font-size: 16pt;
        font-weight: bold;
        color: #000;
    }

    .session-detail-meta {
        font-size: 10pt;
        color: #333;
    }

    .session-detail-description {
        font-size: 11pt;
        line-height: 1.6;
    }

    .session-detail-speakers {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #ddd;
    }

    /* Hide back navigation */
    .back-to-link,
    .session-back-link {
        display: none !important;
    }

    /* ========================================================================
       USER STORY 4: SPEAKER DETAIL
       ======================================================================== */

    /* Speaker detail print styles */
    .speaker-detail-header {
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .speaker-detail-photo,
    .speaker-profile-photo {
        width: 100px !important;
        height: 100px !important;
        border-radius: 50%;
    }

    .speaker-detail-name {
        font-size: 16pt;
        font-weight: bold;
        color: #000;
    }

    .speaker-detail-title,
    .speaker-detail-company,
    .speaker-tagline,
    .speaker-company {
        font-size: 11pt;
        color: #333;
    }

    .speaker-detail-bio,
    .speaker-bio {
        font-size: 11pt;
        line-height: 1.6;
    }

    /* Social links - show URLs as readable text */
    .speaker-social-links a,
    .social-links a {
        display: block;
        margin-bottom: 0.25rem;
    }

    .speaker-social-links a:after,
    .social-links a:after {
        content: " - " attr(href);
        font-size: 0.9em;
        word-break: break-all;
    }

    /* Hide social icons, show text */
    .speaker-social-links i,
    .social-links i {
        display: none;
    }

    .speaker-sessions-list {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #ddd;
    }

    /* ========================================================================
       USER STORY 5: SPEAKERS LIST
       ======================================================================== */

    /* Force list view for speakers (more compact) */
    #cardView {
        display: none !important;
    }

    #listView {
        display: block !important;
    }

    /* Speaker card print styles (if shown) */
    .speaker-card {
        background: #fff;
        border: 1px solid #ddd;
        padding: 0.75rem;
        text-align: left;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .speaker-card:hover {
        transform: none;
    }

    .speaker-card-photo {
        width: 50px !important;
        height: 50px !important;
    }

    .speaker-card-photo .speaker-img {
        width: 50px !important;
        height: 50px !important;
    }

    .speaker-card-name {
        font-size: 10pt;
        font-weight: bold;
        color: #000;
    }

    .speaker-card-tagline,
    .speaker-card-company {
        font-size: 9pt;
        color: #333;
    }

    .speaker-card-sessions {
        font-size: 8pt;
        color: #555;
    }

    /* Remove hover effects */
    .speaker-card:hover .speaker-card-name {
        color: #000;
    }

    /* Speaker list view styles */
    .speaker-list {
        border: 1px solid #ddd;
    }

    .speaker-list-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #ddd;
        text-decoration: none;
        color: #000;
    }

    .speaker-list-item:last-child {
        border-bottom: none;
    }

    .speaker-list-photo {
        flex-shrink: 0;
    }

    .speaker-list-img,
    .speaker-list-placeholder {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50%;
    }

    .speaker-list-content {
        flex: 1;
        min-width: 0;
    }

    .speaker-list-name {
        font-size: 11pt;
        font-weight: bold;
        color: #000;
        margin: 0;
    }

    .speaker-list-tagline {
        font-size: 9pt;
        color: #333;
        margin: 0;
    }

    .speaker-list-company {
        font-size: 9pt;
        color: #555;
        margin: 0;
    }

    .speaker-list-meta {
        flex-shrink: 0;
    }

    .speaker-list-sessions {
        font-size: 8pt;
        color: #555;
    }
}
