/* ============================================================
   Inline Picks - frontend card styles
   Mirrors Editor View / Editorial Tools v2.9.0 card markup exactly.
   ============================================================ */

.ip-disclosure {
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
    margin: 0 0 1.5rem;
    text-align: center;
}

/* The entire card is one <a> tag - clicking anywhere goes to Amazon */
a.ip-card,
.ip-card {
    display: block;
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 1.5rem 1.25rem 1.25rem;
    margin: 0 auto 1.75rem;
    max-width: 460px;
    width: 100%;
    overflow: hidden;
    text-align: center;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

a.ip-card:hover,
.ip-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    text-decoration: none !important;
    color: inherit !important;
}

a.ip-card:focus,
.ip-card:focus {
    outline: 2px solid #131921;
    outline-offset: 2px;
    text-decoration: none !important;
    color: inherit !important;
}

a.ip-card:visited,
.ip-card:visited {
    color: inherit !important;
}

/* Force inner spans to behave like block-level so they stack vertically.
 * Spans used inside <a> instead of divs to avoid wpautop issues. */
.ip-card-image,
.ip-card-name,
.ip-card-logo-row,
.ip-card-divider,
.ip-card-price,
.ip-card-btn {
    display: block;
    box-sizing: border-box;
    max-width: 100%;
}

/* Apply box-sizing globally inside the card for safety */
.ip-card,
.ip-card * {
    box-sizing: border-box;
}

.ip-card-image {
    width: 100%;
    margin: 0 auto 1rem;
    background: #fff;
}

.ip-card-image img {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

/* Short product title - serif, bold, like Bustle */
.ip-card-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0 auto 1rem;
    text-align: center;
    max-width: 360px;
}

/* Row with Amazon logo on left and "See price on Amazon" text on right.
 * min-height ensures the row is at least as tall as the logo (including its
 * descender swoosh) on narrow viewports where the price text doesn't wrap.
 * overflow: visible explicitly so the logo's swoosh can't be clipped by the
 * row's own bounds. */
.ip-card-logo-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 0.875rem;
    padding: 0.25rem;
    min-height: 32px;
    overflow: visible;
}

.ip-card-logo {
    display: inline-flex !important;
    align-items: center;
    flex: 0 0 auto;
    overflow: visible;
    line-height: 0; /* prevent baseline gap below img */
}

.ip-card-logo img {
    max-height: 24px;
    max-width: 100px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    vertical-align: middle;
}

.ip-card-price-link {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a1a;
    text-align: right;
    flex: 1 1 auto;
}

/* Fallback price display when no logo is configured */
.ip-card-price {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.875rem;
    text-align: center;
}

/* Thin horizontal divider above the button */
.ip-card-divider {
    height: 1px;
    background: #e8e8e8;
    margin: 0.5rem 0 1rem;
    border: 0;
}

/* Full-width black pill button */
.ip-card-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    background: #131921;
    color: #fff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    text-transform: none;
    padding: 0.875rem 1rem;
    border-radius: 999px;
    border: none;
    line-height: 1.2;
    transition: background 0.15s ease;
    margin: 0;
    white-space: nowrap;
}

a.ip-card:hover .ip-card-btn,
.ip-card:hover .ip-card-btn {
    background: #2a3142;
}

.ip-arrow {
    display: inline-block;
    font-weight: 400;
    font-size: 1.05em;
    line-height: 1;
    transition: transform 0.15s ease;
}

a.ip-card:hover .ip-arrow,
.ip-card:hover .ip-arrow {
    transform: translateX(3px);
}

@media (min-width: 768px) {
    a.ip-card,
    .ip-card {
        padding: 1.75rem 1.5rem 1.5rem;
        max-width: 500px;
    }
    .ip-card-image img {
        max-height: 400px;
    }
    .ip-card-name {
        font-size: 1.125rem;
        max-width: 420px;
    }
    .ip-card-btn {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
}

/* Mobile / touch devices: replace hover lift with active tap feedback */
@media (hover: none) {
    a.ip-card:hover,
    .ip-card:hover {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
        transform: none;
    }
    a.ip-card:active,
    .ip-card:active {
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
        transform: translateY(-1px);
    }
}
