/**
 * Export and Share Styles
 * Includes both screen and print styles
 */

/* Export/Share Toolbar */
.export-share-toolbar {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.export-share-title {
    font-size: 14px;
    font-weight: 600;
    color: #5f6368;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.export-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.export-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.export-share-btn:hover {
    background: #f1f3f4;
    border-color: #5f6368;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-share-btn:active {
    transform: translateY(0);
}

.export-share-btn .btn-icon {
    font-size: 16px;
}

.export-share-btn .btn-label {
    font-size: 13px;
}

/* Specific button colors */
.export-btn:hover {
    background: #fee;
    border-color: #fbb;
}

.print-btn:hover {
    background: #e8f7f0;
    border-color: #0ea861;
}

.whatsapp-btn:hover {
    background: #e8f7ed;
    border-color: #25D366;
}

.facebook-btn:hover {
    background: #e7f3ff;
    border-color: #1877f2;
}

.twitter-btn:hover {
    background: #e8f5fd;
    border-color: #1da1f2;
}

.email-btn:hover {
    background: #fff4e5;
    border-color: #ff9800;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .export-share-buttons {
        justify-content: center;
    }
    
    .export-share-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        justify-content: center;
    }
    
    .export-share-btn .btn-label {
        display: none;
    }
    
    .export-share-btn .btn-icon {
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .export-share-btn {
        flex: 1 1 calc(33.333% - 6px);
    }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    /* Hide non-essential elements */
    header,
    nav,
    footer,
    .export-share-toolbar,
    .convert-btn,
    .close-btn,
    .save-btn,
    button,
    .mobile-menu-btn,
    .mobile-menu-overlay,
    .disclaimer,
    .quick-links,
    .converter-card,
    #recipeInput,
    .model-selector,
    .cooking-mode-toggle-v3,
    .step-actions-v3,
    .results-header .close-btn,
    .preferences-btn,
    #authLink,
    .nav-link {
        display: none !important;
    }
    
    /* Reset page margins */
    @page {
        margin: 1cm;
        size: A4;
    }
    
    body {
        margin: 0;
        padding: 0;
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    /* Results container */
    #results {
        display: block !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    #resultsContent {
        padding: 0 !important;
    }
    
    /* Print header */
    #results::before {
        content: 'ThermoGenius Recipe';
        display: block;
        font-size: 18pt;
        font-weight: bold;
        color: #0ea861;
        margin-bottom: 12pt;
        padding-bottom: 6pt;
        border-bottom: 2pt solid #0ea861;
    }
    
    /* Recipe title */
    h1, h2, h3 {
        color: #000;
        page-break-after: avoid;
        margin-top: 0;
    }
    
    h3 {
        font-size: 16pt;
        margin-bottom: 8pt;
    }
    
    h4 {
        font-size: 13pt;
        margin-top: 12pt;
        margin-bottom: 6pt;
        page-break-after: avoid;
    }
    
    /* Recipe meta info */
    .recipe-meta-v3,
    .recipe-header-v3 {
        margin-bottom: 12pt;
    }
    
    .recipe-meta-item-v3 {
        display: inline;
        margin-right: 12pt;
        font-size: 10pt;
    }
    
    /* Ingredients */
    .recipe-ingredients-v3,
    ul {
        page-break-inside: avoid;
        margin-bottom: 16pt;
    }
    
    .ingredient-item-v3,
    li {
        line-height: 1.6;
        margin-bottom: 3pt;
        page-break-inside: avoid;
    }
    
    /* Hide ingredient checkboxes in print */
    .ingredient-checkbox-v3 {
        display: none !important;
    }
    
    /* Steps */
    .recipe-steps-v3,
    ol {
        page-break-before: auto;
    }
    
    .step-card-v3 {
        border: 1pt solid #ddd;
        padding: 10pt;
        margin-bottom: 10pt;
        page-break-inside: avoid;
        border-radius: 4pt;
        background: #f9f9f9;
    }
    
    .step-card-v3.active {
        border-color: #0ea861;
        background: #e8f7f0;
    }
    
    .step-header-v3 {
        display: flex;
        justify-content: space-between;
        margin-bottom: 6pt;
    }
    
    .step-number-v3 {
        font-weight: bold;
        font-size: 12pt;
        color: #0ea861;
    }
    
    .step-duration-v3 {
        font-size: 10pt;
        color: #666;
    }
    
    .step-instruction-v3 {
        line-height: 1.5;
        margin-bottom: 6pt;
    }
    
    .step-params-v3 {
        display: flex;
        gap: 12pt;
        font-size: 10pt;
        color: #555;
        margin-top: 6pt;
        padding-top: 6pt;
        border-top: 1pt dashed #ddd;
    }
    
    .step-param-v3 {
        display: inline-flex;
        align-items: center;
        gap: 4pt;
    }
    
    /* Progress bar - hide in print */
    .recipe-progress-v3 {
        display: none !important;
    }
    
    /* Notes and tips */
    .recipe-notes,
    blockquote,
    .notes-section {
        background: #f0f0f0;
        border-left: 3pt solid #0ea861;
        padding: 8pt;
        margin: 10pt 0;
        page-break-inside: avoid;
    }
    
    /* Lists */
    ul, ol {
        padding-left: 20pt;
    }
    
    li {
        margin-bottom: 4pt;
    }
    
    /* Links */
    a {
        color: #000;
        text-decoration: none;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }
    
    /* Footer */
    .print-footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        text-align: center;
        font-size: 9pt;
        color: #999;
        border-top: 1pt solid #ddd;
        padding-top: 6pt;
    }
    
    /* Add print footer via pseudo-element */
    body::after {
        content: 'Generated by ThermoGenius.com';
        display: block;
        text-align: center;
        font-size: 9pt;
        color: #999;
        margin-top: 20pt;
        padding-top: 10pt;
        border-top: 1pt solid #ddd;
    }
    
    /* Force black text */
    * {
        color: #000 !important;
        background: transparent !important;
    }
    
    /* Except for specific highlighted elements */
    .step-card-v3.active,
    .recipe-notes,
    blockquote {
        background: #f5f5f5 !important;
    }
    
    /* Page breaks */
    h1, h2, h3, h4 {
        page-break-after: avoid;
    }
    
    .step-card-v3,
    .ingredient-item-v3 {
        page-break-inside: avoid;
    }
    
    /* Ensure first page has recipe title */
    .recipe-header-v3 {
        page-break-before: avoid;
    }
}

/* Print button hint (only show on screen) */
@media screen {
    .print-hint {
        font-size: 12px;
        color: #5f6368;
        margin-top: 8px;
        text-align: center;
    }
}
