/* ============================================================
   Recipe Lite Pro — Premium Edition
   Audience: US women, food blog aesthetic
   ============================================================ */

/* ---- Keyframes ---- */
@keyframes rlp-rise {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes rlp-shimmer {
    0%   { background-position: -300% center; }
    100% { background-position: 300% center; }
}
@keyframes rlp-pop {
    0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
    65%  { transform: scale(1.25) rotate(4deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); }
}

/* ---- Design tokens ---- */
:root {
    --terra:      #C96A3E;
    --terra-lt:   #E8896A;
    --gold:       #D4A574;
    --gold-lt:    #F0C48A;
    --ink:        #2A1F1A;
    --muted:      #9B8878;
    --border:     #EDE5D5;
    --cream:      #FAF5EE;
    --note-bg:    #FFF8F0;
    --r:          20px;
    --font-serif: Georgia, "Times New Roman", serif;
    --font-ui:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow:     0 2px 8px rgba(42,34,32,.04),
                  0 20px 60px rgba(42,34,32,.13),
                  0 0 0 1px rgba(237,229,213,.7);
    --shadow-up:  0 4px 16px rgba(201,106,62,.14),
                  0 36px 90px rgba(42,34,32,.2),
                  0 0 0 1px rgba(201,106,62,.14);
}

/* ============================================================
   Card
   ============================================================ */
.rlp-card {
    position: relative;
    background: #fff;
    border-radius: var(--r);
    box-shadow: var(--shadow);
    max-width: 820px;
    margin: 2.5rem auto;
    overflow: visible;
    font-family: var(--font-ui);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.7;
    will-change: transform;
    transition: transform .45s cubic-bezier(.16,1,.3,1),
                box-shadow .45s cubic-bezier(.16,1,.3,1);
    animation: rlp-rise .7s cubic-bezier(.16,1,.3,1) both;
}

.rlp-card:hover {
    transform: translateY(-10px) scale(1.004);
    box-shadow: var(--shadow-up);
}

/* ============================================================
   Hero image
   ============================================================ */
.rlp-card .rlp-image-wrap {
    position: relative;
    height: 420px;
    border-radius: var(--r) var(--r) 0 0;
    overflow: hidden;
    background: #e8ddd0;
    line-height: 0;
    z-index: 0;
}

.rlp-card .rlp-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .8s cubic-bezier(.16,1,.3,1);
    will-change: transform;
}

.rlp-card:hover .rlp-image-wrap img {
    transform: scale(1.07);
}

/* Warm vignette overlay */
.rlp-card .rlp-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(30,15,8,.04) 0%,
        transparent       35%,
        rgba(30,15,8,.28) 70%,
        rgba(30,15,8,.52) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* ============================================================
   Header — floats over image bottom with rounded lift
   ============================================================ */
.rlp-header {
    position: relative;
    z-index: 3;
    background: #fff;
    border-radius: 26px 26px 0 0;
    margin-top: -34px;
    padding: 2.1rem 2.25rem 1.75rem;
    box-shadow: 0 -16px 48px rgba(20,10,5,.13);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

/* Decorative top notch on the lifted card */
.rlp-header::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: var(--border);
}

.rlp-header-text { flex: 1; min-width: 0; }

.rlp-title {
    margin: 0 0 .55rem;
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.018em;
    background: linear-gradient(125deg, var(--ink) 0%, #6B3A26 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rlp-desc {
    margin: 0;
    font-size: .91rem;
    color: var(--muted);
    font-style: italic;
    line-height: 1.6;
    max-width: 490px;
}

/* ---- Print button ---- */
.rlp-actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
    padding-top: .35rem;
}

.rlp-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem 1.3rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-ui);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    line-height: 1;
    transition: all .28s ease;
}

.rlp-btn:active { transform: scale(.93) !important; }

.rlp-btn-print {
    background: linear-gradient(
        270deg,
        var(--gold) 0%,
        var(--terra) 40%,
        var(--terra-lt) 60%,
        var(--gold) 100%
    );
    background-size: 300% 100%;
    color: #fff;
    box-shadow: 0 4px 18px rgba(201,106,62,.38);
    animation: rlp-shimmer 4s linear infinite;
}

.rlp-btn-print:hover {
    box-shadow: 0 8px 28px rgba(201,106,62,.55);
    transform: translateY(-3px);
}

/* ============================================================
   Meta bar — floating pill badges
   ============================================================ */
.rlp-meta-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem;
    padding: 1.4rem 2rem;
    background: var(--cream);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.rlp-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    padding: .7rem 1.2rem;
    background: #fff;
    border-radius: 50px;
    border: 1px solid rgba(237,229,213,.9);
    box-shadow:
        0 2px 8px rgba(201,106,62,.07),
        0 1px 3px rgba(0,0,0,.04),
        inset 0 1px 0 rgba(255,255,255,.9);
    min-width: 82px;
    transition: transform .22s ease, box-shadow .22s ease;
    cursor: default;
}

.rlp-meta-item:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow:
        0 8px 24px rgba(201,106,62,.18),
        0 2px 6px rgba(0,0,0,.06);
}

.rlp-meta-icon {
    color: var(--terra);
    display: flex;
    margin-bottom: .05rem;
}

.rlp-meta-label {
    display: block;
    font-size: .59rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
}

.rlp-meta-value {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    color: var(--ink);
    font-family: var(--font-serif);
    line-height: 1.15;
}

/* ============================================================
   Body
   ============================================================ */
.rlp-body {
    padding: 2.25rem;
}

/* ---- Section title — ornamental ---- */
.rlp-section          { margin-bottom: 2.5rem; }
.rlp-section:last-child { margin-bottom: 0; }

.rlp-section-title {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 0 0 1.5rem;
    font-size: .65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--terra);
    white-space: nowrap;
}

.rlp-section-title::before,
.rlp-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
}

.rlp-section-title::before {
    background: linear-gradient(to left, var(--border), transparent);
}

/* ============================================================
   Ingredients — animated round checkboxes
   ============================================================ */
.rlp-ingredients {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0 2.5rem;
}

.rlp-ingredients li {
    border-bottom: 1px solid #F5EFE6;
}
.rlp-ingredients li:last-child { border-bottom: none; }

.rlp-ingredients label {
    display: flex;
    align-items: baseline;
    gap: .85rem;
    padding: .65rem .3rem;
    cursor: pointer;
    font-size: .93rem;
    line-height: 1.5;
    border-radius: 7px;
    transition: background .15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.rlp-ingredients label:hover { background: #FDF8F3; }

.rlp-ingredients input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 1.5px solid #D4C4B0;
    border-radius: 50%;
    position: relative;
    top: 3px;
    cursor: pointer;
    background: #fff;
    transition: all .22s ease;
}

.rlp-ingredients input[type="checkbox"]:hover {
    border-color: var(--terra);
    transform: scale(1.12);
    box-shadow: 0 0 0 4px rgba(201,106,62,.1);
}

.rlp-ingredients input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--terra), var(--gold));
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(201,106,62,.4);
    animation: rlp-pop .3s ease;
}

.rlp-ingredients input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    position: absolute;
    top: 2px;
    left: 6px;
}

.rlp-ingredients label.rlp-done .rlp-ing-text {
    text-decoration: line-through;
    color: #C4B5A5;
    transition: color .2s ease;
}

/* ============================================================
   Instructions — 3D gradient step numbers
   ============================================================ */
.rlp-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: rlp-step;
}

.rlp-steps > li {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    counter-increment: rlp-step;
    font-size: .94rem;
    line-height: 1.75;
    padding: 1.25rem .35rem;
    border-bottom: 1px solid #F5EFE6;
    border-radius: 8px;
    transition: background .18s ease;
}

.rlp-steps > li:hover          { background: #FDFAF5; }
.rlp-steps > li:first-child    { padding-top: 0; }
.rlp-steps > li:last-child     { padding-bottom: 0; border-bottom: none; }

.rlp-steps > li::before {
    content: counter(rlp-step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--terra) 0%, var(--gold) 100%);
    color: #fff;
    border-radius: 50%;
    font-size: .78rem;
    font-weight: 800;
    font-family: var(--font-serif);
    margin-top: 3px;
    /* 3D effect */
    box-shadow:
        0 4px 16px rgba(201,106,62,.4),
        0 1px 0 rgba(255,255,255,.3) inset,
        0 -2px 0 rgba(0,0,0,.12) inset;
    transition: transform .2s ease, box-shadow .2s ease;
}

.rlp-steps > li:hover::before {
    transform: scale(1.1) rotate(-5deg);
    box-shadow:
        0 8px 24px rgba(201,106,62,.5),
        0 1px 0 rgba(255,255,255,.3) inset;
}

/* ============================================================
   Notes — stylish quote block
   ============================================================ */
.rlp-notes {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.rlp-notes-body {
    position: relative;
    background: var(--note-bg);
    border-radius: 14px;
    padding: 1.4rem 1.6rem 1.4rem 2rem;
    font-size: .88rem;
    color: var(--muted);
    font-style: italic;
    line-height: 1.8;
    border: 1px solid rgba(201,106,62,.1);
    box-shadow: 0 2px 16px rgba(201,106,62,.06), inset 4px 0 0 var(--terra);
}

.rlp-notes-body::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: var(--font-serif);
    font-size: 5rem;
    line-height: 1;
    color: var(--terra);
    opacity: .18;
    pointer-events: none;
}

.rlp-notes-body p            { margin: 0 0 .45rem; }
.rlp-notes-body p:last-child { margin-bottom: 0; }

/* ============================================================
   Footer
   ============================================================ */
.rlp-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2rem 1.8rem;
    border-top: 1px solid var(--border);
    background: var(--cream);
}

/* ============================================================
   Pinterest overlay
   ============================================================ */
.rlp-pin-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.rlp-pin-wrap > img { display: block; }

.rlp-pin-btn {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px 8px 10px;
    background: #e60023;
    color: #fff;
    border-radius: 24px;
    font-family: var(--font-ui);
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
    opacity: 0;
    transform: translateY(-10px) scale(.92);
    transition: opacity .25s ease, transform .25s cubic-bezier(.16,1,.3,1);
    pointer-events: none;
    z-index: 20;
    white-space: nowrap;
    line-height: 1;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

/* Hero Pinterest button — top right */
.rlp-card .rlp-image-wrap .rlp-pin-btn {
    left: auto;
    right: 16px;
    top: 16px;
}

.rlp-pin-wrap:hover .rlp-pin-btn,
.rlp-card .rlp-image-wrap:hover .rlp-pin-btn {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.rlp-pin-btn svg { flex-shrink: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 620px) {
    .rlp-card:hover { transform: translateY(-5px); }

    .rlp-card .rlp-image-wrap { height: 280px; }

    .rlp-header {
        flex-direction: column;
        padding: 1.75rem 1.5rem 1.4rem;
        margin-top: -26px;
    }

    .rlp-title  { font-size: 1.5rem; }
    .rlp-body   { padding: 1.5rem; }
    .rlp-footer { padding: 1rem 1.5rem 1.5rem; }

    .rlp-meta-bar   { gap: .5rem; padding: 1rem 1.25rem; }
    .rlp-meta-item  { min-width: 70px; padding: .55rem .75rem; }
    .rlp-meta-label { font-size: .54rem; }
    .rlp-meta-value { font-size: .82rem; }
    .rlp-meta-icon  { display: none; }

    .rlp-ingredients { grid-template-columns: 1fr; }
}

/* ============================================================
   Action Bar — Jump to Recipe + Print Recipe
   Injected automatically above post content
   ============================================================ */
.rlp-action-bar {
    display: flex;
    gap: .75rem;
    margin: 0 0 2rem;
    flex-wrap: wrap;
    font-family: var(--font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.rlp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.6rem;
    border-radius: 50px;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    transition: all .28s cubic-bezier(.16,1,.3,1);
    border: 1.5px solid var(--terra, #C96A3E);
    color: var(--terra, #C96A3E) !important;
    background: transparent;
    line-height: 1;
    white-space: nowrap;
}

.rlp-action-btn:hover {
    background: linear-gradient(135deg, #C96A3E 0%, #D4A574 100%);
    color: #fff !important;
    border-color: transparent;
    box-shadow: 0 6px 24px rgba(201,106,62,.42);
    transform: translateY(-3px);
    text-decoration: none !important;
}

.rlp-action-btn:active {
    transform: translateY(-1px) scale(.95);
}

.rlp-action-btn svg {
    flex-shrink: 0;
    transition: transform .25s ease;
}

.rlp-jump-btn:hover svg        { transform: translateY(4px); }
.rlp-print-top-btn:hover svg   { transform: scale(1.15); }

@media (max-width: 480px) {
    .rlp-action-btn { padding: .6rem 1.2rem; font-size: .72rem; }
}
