/**
 * Inline Related Posts - Frontend Styles
 * Contains responsive layouts for all themes (Minimalist, Modern Box, Left Accent, Card Image, Gradient Glow, Editorial)
 */

/* Outer Wrapper */
.irp-wrapper {
    display: block;
    position: relative;
    width: 100%;
    clear: both;
    box-sizing: border-box;
}

/* Top Tag (stays above the box) */
.irp-top-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 14px;
    background-color: #2563eb;
    color: #ffffff;
    border-radius: 6px 6px 0 0;
    margin-left: 14px;
    position: relative;
    top: 1px;
    z-index: 2;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
    line-height: 1.4;
    transition: all 0.2s ease;
}

.irp-top-tag span {
    display: inline-block;
}

/* Inner Box */
.irp-box {
    display: block;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    clear: both;
    padding: 16px 20px;
    border-radius: 6px;
    font-family: inherit;
    line-height: 1.5;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.irp-box * {
    box-sizing: border-box;
}

.irp-box .irp-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit;
    width: 100%;
}

.irp-box .irp-content-wrap {
    flex: 1;
    min-width: 0;
}

.irp-box .irp-cta {
    font-weight: 700;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    display: inline-block;
    transition: color 0.2s ease;
}

.irp-box .irp-title {
    font-weight: 600;
    font-size: 1.05em;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.irp-box:hover .irp-title {
    text-decoration-thickness: 2.5px;
}

/* Shadow Variation */
.irp-box.irp-has-shadow {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.irp-box.irp-has-shadow:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Theme 1: Minimalist */
.irp-theme-minimalist {
    border-top: 2px solid #3b82f6;
    border-bottom: 2px solid #3b82f6;
    border-left: none;
    border-right: none;
    border-radius: 0;
    background-color: #f8fafc;
    padding: 14px 16px;
}

/* Theme 2: Modern Box */
.irp-theme-modern_box {
    border: 1.5px solid #3b82f6;
    border-radius: 8px;
    background-color: #f8fafc;
    padding: 16px 22px;
}

.irp-theme-modern_box .irp-cta {
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Theme 3: Left Accent Bar */
.irp-theme-left_accent {
    border-left: 5px solid #3b82f6 !important;
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0 8px 8px 0;
    background-color: #ffffff;
    padding: 16px 22px;
}

/* Theme 4: Card with Featured Image (Large Prominent View) */
.irp-theme-card_image {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #ffffff;
    padding: 16px 20px;
}

.irp-theme-card_image .irp-thumbnail {
    width: 170px;
    height: 115px;
    flex-shrink: 0;
    margin-right: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.irp-theme-card_image .irp-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.irp-theme-card_image:hover .irp-thumbnail img {
    transform: scale(1.06);
}

.irp-theme-card_image .irp-thumb-fallback {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.irp-theme-card_image .irp-thumb-fallback svg {
    color: #94a3b8;
}

.irp-theme-card_image .irp-title {
    font-size: 1.1em;
    line-height: 1.45;
}

/* Theme 5: Gradient Glow */
.irp-theme-gradient_glow {
    border: 2px solid transparent;
    border-radius: 8px;
    background: linear-gradient(#ffffff, #ffffff) padding-box,
                linear-gradient(135deg, #3b82f6, #8b5cf6) border-box;
    padding: 16px 20px;
}

/* Theme 6: Editorial / News */
.irp-theme-editorial {
    border-top: 3px solid #0f172a;
    border-bottom: 1px solid #cbd5e1;
    border-left: none;
    border-right: none;
    border-radius: 0;
    background-color: transparent;
    padding: 14px 6px;
}

.irp-theme-editorial .irp-cta {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1em;
    text-transform: none;
    letter-spacing: normal;
}

.irp-theme-editorial .irp-title {
    font-family: inherit;
    font-weight: 700;
}

/* Powered By */
.irp-powered-by {
    font-size: 10px;
    color: #94a3b8;
    text-align: right;
    margin-top: 6px;
    line-height: 1;
}

.irp-powered-by span {
    letter-spacing: 0.3px;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .irp-box {
        padding: 14px 16px;
    }
    .irp-theme-card_image .irp-thumbnail {
        width: 120px;
        height: 85px;
        margin-right: 14px;
    }
    .irp-box .irp-title {
        font-size: 0.98em;
    }
    .irp-box .irp-cta {
        font-size: 0.88em;
    }
}

@media (max-width: 480px) {
    .irp-theme-card_image .irp-link {
        flex-direction: column;
        align-items: stretch;
    }
    .irp-theme-card_image .irp-thumbnail {
        width: 100%;
        height: 160px;
        margin-right: 0;
        margin-bottom: 12px;
    }
}
