/*
 * Recipe Card Baseline Styles v4.2.0
 * 
 * Direct CSS translation of the beautiful Google Stitch design.
 * Styles mapped to existing recipe card tags to avoid loading Tailwind.
 * Overrides theme floats and sets full width.
 */

:root {
    --rc-orange: #FF5722;
    --rc-orange-hover: #E64A19;
    --rc-orange-light: #FFF3E0;
    --rc-orange-border: #FFE0B2;
    --rc-blue: #1E88E5;
    --rc-blue-light: #E3F2FD;
    --rc-blue-border: #BBDEFB;
    --rc-text-dark: #111827;
    --rc-text-body: #374151;
    --rc-text-muted: #4b5563;
    --rc-text-light: #9ca3af;
    --rc-border: #f3f4f6;
    --rc-border-line: #e5e7eb;
    --rc-font-serif: 'Playfair Display', Georgia, serif;
    --rc-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --rc-transition: 0.2s ease-in-out;
}

/* ===== Card Container (CRITICAL: Float Override & Full Width) ===== */
.entry-content .recipe-card,
.recipe-card {
    width: 100% !important;
    max-width: 896px !important; /* max-w-4xl */
    margin: 2.5rem auto !important;
    padding: 0 !important;
    border: 1px solid var(--rc-border) !important;
    border-radius: 1rem !important; /* rounded-2xl */
    background: #ffffff !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important; /* shadow-xl */
    font-family: var(--rc-font-sans) !important;
    color: var(--rc-text-body) !important;
    line-height: 1.625 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
    
    /* Override theme floated card layouts */
    float: none !important;
    clear: both !important;
    display: block !important;
}

.recipe-card *,
.recipe-card *::before,
.recipe-card *::after {
    box-sizing: border-box !important;
}

/* ===== Hero Image (CRITICAL: Float Override) ===== */
.recipe-card .recipe-floating-image {
    width: 100% !important;
    height: 320px !important; /* h-80 */
    overflow: hidden !important;
    position: relative !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

@media (min-width: 768px) {
    .recipe-card .recipe-floating-image {
        height: 384px !important; /* h-96 */
    }
}

.recipe-card .recipe-floating-image img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===== Content Inner Wrapper ===== */
.recipe-card .recipe-content-inner {
    padding: 1.5rem !important; /* p-6 */
}

@media (min-width: 768px) {
    .recipe-card .recipe-content-inner {
        padding: 2.5rem !important; /* md:p-10 */
    }
}

/* ===== Header (Title & Description) ===== */
.recipe-card .recipe-header {
    text-align: center !important;
    margin-bottom: 2rem !important; /* mb-8 */
    padding: 0 !important;
    float: none !important;
    width: 100% !important;
}

.recipe-card .recipe-title {
    font-family: var(--rc-font-serif) !important;
    font-size: 1.875rem !important; /* text-3xl */
    font-weight: 700 !important;
    color: var(--rc-text-dark) !important;
    margin: 0 0 0.75rem 0 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    display: inline-block !important;
    position: relative !important;
    border: none !important;
}

@media (min-width: 768px) {
    .recipe-card .recipe-title {
        font-size: 3rem !important; /* text-5xl */
    }
}

.recipe-card .title-spark-svg {
    position: absolute !important;
    top: -1rem !important;
    right: -2rem !important;
    width: 2rem !important;
    height: 2rem !important;
    color: var(--rc-orange) !important;
}

.recipe-card .recipe-description {
    font-size: 1.125rem !important; /* text-lg */
    color: var(--rc-text-muted) !important;
    margin: 0 auto !important;
    line-height: 1.625 !important;
    max-width: 580px !important;
    text-align: center !important;
}

@media (min-width: 768px) {
    .recipe-card .recipe-description {
        font-size: 1.25rem !important; /* text-xl */
    }
}

/* ===== Boxed Meta Row ===== */
.recipe-card .recipe-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    background-color: #f9fafb !important; /* bg-gray-50 */
    border-radius: 0.75rem !important; /* rounded-xl */
    padding: 1rem !important; /* p-4 */
    margin: 0 0 2rem 0 !important;
    border: 1px solid var(--rc-border) !important;
    float: none !important;
    width: 100% !important;
}

@media (min-width: 768px) {
    .recipe-card .recipe-meta {
        padding: 1.5rem !important; /* md:p-6 */
    }
}

.recipe-card .recipe-time,
.recipe-card .recipe-servings {
    display: flex !important;
    flex: 1 !important;
    justify-content: center !important;
    width: auto !important;
}

.recipe-card .time-item,
.recipe-card .servings-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 0.5rem !important;
    flex: 1 !important;
    width: 50% !important;
    margin-bottom: 1rem !important;
    border-right: 1px solid var(--rc-border-line) !important;
    text-align: center !important;
}

/* 2x2 grid for mobile */
.recipe-card .time-item:nth-child(2),
.recipe-card .servings-item {
    border-right: none !important;
}

.recipe-card .servings-item {
    margin-bottom: 0 !important;
}

@media (min-width: 768px) {
    .recipe-card .time-item,
    .recipe-card .servings-item {
        width: 25% !important;
        margin-bottom: 0 !important;
        border-right: 1px solid var(--rc-border-line) !important;
    }
    
    .recipe-card .time-item:nth-child(2) {
        border-right: 1px solid var(--rc-border-line) !important;
    }
    
    .recipe-card .servings-item {
        border-right: none !important;
    }
}

/* Meta SVG Icons */
.recipe-card .meta-svg {
    width: 2rem !important; /* w-8 */
    height: 2rem !important; /* h-8 */
    color: var(--rc-orange) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 0.5rem !important; /* mb-2 */
    display: block !important;
}

.recipe-card .time-content,
.recipe-card .servings-content {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.35 !important;
    align-items: center !important;
}

.recipe-card .time-content strong,
.recipe-card .servings-content strong {
    font-size: 0.875rem !important; /* text-sm */
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important; /* tracking-wider */
    color: var(--rc-text-muted) !important;
    font-weight: 500 !important;
    margin-bottom: 0.15rem !important;
}

.recipe-card .time-content span,
.recipe-card .servings-content span {
    font-size: 1rem !important;
    color: var(--rc-text-dark) !important;
    font-weight: 600 !important;
}

/* ===== Print Recipe Button ===== */
.recipe-card .print-btn-wrap {
    margin-bottom: 2.5rem !important; /* mb-10 */
}

.recipe-card .rc-btn-print-large {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important; /* gap-2 */
    width: 100% !important;
    padding: 1rem !important; /* py-4 */
    background: var(--rc-orange) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.75rem !important; /* rounded-xl */
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color var(--rc-transition) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important; /* shadow-md */
}

.recipe-card .rc-btn-print-large:hover {
    background: var(--rc-orange-hover) !important;
}

.recipe-card .rc-btn-print-large svg {
    width: 1.5rem !important; /* w-6 */
    height: 1.5rem !important; /* h-6 */
    fill: currentColor !important;
}

/* ===== Two-Column Content Wrapper ===== */
.recipe-card .recipe-columns {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important; /* gap-8 */
    margin-bottom: 2.5rem !important; /* mb-10 */
}

@media (min-width: 768px) {
    .recipe-card .recipe-columns {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* md:grid-cols-2 */
        gap: 2rem !important;
    }
}

/* ===== Section Styling ===== */
.recipe-card .recipe-ingredients,
.recipe-card .recipe-instructions {
    background-color: #f9fafb !important; /* bg-gray-50 */
    border-radius: 1rem !important; /* rounded-2xl */
    padding: 1.5rem !important; /* p-6 */
    border: 1px solid var(--rc-border) !important;
    width: 100% !important;
    margin: 0 !important;
}

.recipe-card .section-title {
    font-family: var(--rc-font-serif) !important;
    font-size: 1.5rem !important; /* text-2xl */
    font-weight: 700 !important;
    color: var(--rc-text-dark) !important;
    margin: 0 0 1.5rem 0 !important; /* mb-6 */
    padding: 0 !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important; /* gap-3 */
}

.recipe-card .section-title-svg {
    width: 1.75rem !important; /* w-7 */
    height: 1.75rem !important; /* h-7 */
    color: var(--rc-orange) !important;
}

/* List Style Reset */
.recipe-card ol,
.recipe-card ul {
    list-style: none !important;
    counter-reset: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.recipe-card li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.recipe-card li::before {
    content: none !important;
    display: none !important;
}

/* ===== Ingredients List ===== */
.recipe-card .ingredient-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.75rem !important; /* gap-3 */
    border-bottom: 1px solid var(--rc-border-line) !important; /* border-gray-200 */
    padding-bottom: 0.75rem !important; /* pb-3 */
    margin-bottom: 1rem !important;
    background: transparent !important;
    cursor: pointer !important;
    width: 100% !important;
}

.recipe-card .ingredient-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.recipe-card .ingredient-checkbox {
    width: 1.25rem !important; /* w-5 */
    height: 1.25rem !important; /* h-5 */
    min-width: 1.25rem !important;
    max-width: 1.25rem !important;
    min-height: 1.25rem !important;
    max-height: 1.25rem !important;
    border: 1px solid #d1d5db !important; /* border-gray-300 */
    border-radius: 0.25rem !important; /* rounded */
    background-color: #ffffff !important;
    cursor: pointer !important;
    position: relative !important;
    margin-top: 0.25rem !important; /* mt-1 */
    flex-shrink: 0 !important;
}

.recipe-card .ingredient-item:hover .ingredient-checkbox {
    border-color: var(--rc-orange) !important;
}

.recipe-card .ingredient-item.checked .ingredient-checkbox {
    border-color: var(--rc-orange) !important;
    background-color: var(--rc-orange) !important;
}

.recipe-card .ingredient-item.checked .ingredient-checkbox::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 5px !important;
    top: 1px !important;
    width: 5px !important;
    height: 9px !important;
    border: solid #ffffff !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
}

.recipe-card .ingredient-item.checked .ingredient-text {
    color: var(--rc-text-light) !important;
    text-decoration: line-through !important;
}

.recipe-card .ingredient-text {
    color: var(--rc-text-body) !important;
    font-size: 0.95rem !important;
    flex: 1 !important;
}

/* ===== Instructions List ===== */
.recipe-card .instruction-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 1rem !important; /* gap-4 */
    border-bottom: 1px solid var(--rc-border-line) !important; /* border-gray-200 */
    padding-bottom: 1rem !important; /* pb-4 */
    margin-bottom: 1rem !important;
    background: transparent !important;
    cursor: pointer !important;
    width: 100% !important;
}

.recipe-card .instruction-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Step Number Badge */
.recipe-card .step-number-badge {
    width: 2rem !important; /* w-8 */
    height: 2rem !important; /* h-8 */
    min-width: 2rem !important;
    max-width: 2rem !important;
    min-height: 2rem !important;
    max-height: 2rem !important;
    border-radius: 9999px !important; /* rounded-full */
    background-color: var(--rc-orange) !important; /* bg-orange-500 */
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important; /* font-bold */
    font-size: 0.875rem !important; /* text-sm */
    flex-shrink: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    border: none !important;
}

/* Hide theme counter markers */
.recipe-card .step-number {
    display: none !important;
}

.recipe-card .instruction-item.checked .step-number-badge {
    background-color: var(--rc-text-light) !important;
}

.recipe-card .instruction-item.checked .instruction-text {
    color: var(--rc-text-light) !important;
    text-decoration: line-through !important;
}

.recipe-card .instruction-text {
    color: var(--rc-text-body) !important;
    font-size: 0.95rem !important;
    line-height: 1.625 !important;
    flex: 1 !important;
    padding-top: 0.25rem !important; /* pt-1 */
}

/* ===== Collapsible Info Cards (Nutrition & Allergy) ===== */
.recipe-card .info-cards-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

.recipe-card .info-card {
    border-radius: 0.75rem !important; /* rounded-xl */
    overflow: hidden !important;
    transition: background-color 0.2s ease !important;
}

.recipe-card .info-card-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 1rem !important; /* p-4 */
    cursor: pointer !important;
}

.recipe-card .info-card-header-left {
    display: flex !important;
    align-items: flex-start !important;
    gap: 1rem !important; /* gap-4 */
    flex: 1 !important;
}

/* Inner white circle wrapper for icon */
.recipe-card .info-card-icon-wrap {
    background-color: #ffffff !important;
    border-radius: 9999px !important;
    padding: 0.5rem !important;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06) !important; /* shadow-sm */
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
}

.recipe-card .info-card-icon {
    width: 1.5rem !important; /* w-6 */
    height: 1.5rem !important; /* h-6 */
    flex-shrink: 0 !important;
}

.recipe-card .info-card-content-block {
    flex-grow: 1 !important;
}

.recipe-card .info-card-title {
    font-weight: 700 !important;
    color: var(--rc-text-dark) !important;
    font-size: 0.875rem !important; /* text-sm */
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important; /* tracking-wide */
    margin: 0.25rem 0 0 0 !important;
    line-height: 1.2 !important;
}

.recipe-card .info-card-body-text {
    font-size: 0.875rem !important; /* text-sm */
    color: var(--rc-text-muted) !important;
    margin: 0.25rem 0 0 0 !important;
    line-height: 1.5 !important;
    display: none; /* Collapsed by default */
}

.recipe-card .info-card-arrow {
    width: 1.25rem !important; /* w-5 */
    height: 1.25rem !important; /* h-5 */
    color: #9ca3af !important; /* text-gray-400 */
    flex-shrink: 0 !important;
    margin-top: 0.25rem !important; /* mt-1 */
    transition: transform var(--rc-transition) !important;
}

/* Active Open Card state */
.recipe-card .info-card.open .info-card-body-text {
    display: block !important;
}

.recipe-card .info-card.open .info-card-arrow {
    transform: rotate(180deg) !important;
}

/* Nutrition card colors */
.recipe-card .nutrition-card {
    background-color: var(--rc-orange-light) !important;
    border: 1px solid var(--rc-orange-border) !important;
}

.recipe-card .nutrition-card:hover {
    background-color: rgba(255, 243, 224, 0.7) !important;
}

.recipe-card .nutrition-card .info-card-icon {
    color: var(--rc-orange) !important;
}

/* Allergy card colors */
.recipe-card .allergy-card {
    background-color: var(--rc-blue-light) !important;
    border: 1px solid var(--rc-blue-border) !important;
}

.recipe-card .allergy-card:hover {
    background-color: rgba(227, 242, 253, 0.7) !important;
}

.recipe-card .allergy-card .info-card-icon {
    color: var(--rc-blue) !important;
}
