/**
 * Post Hero Promo Component
 * Built strictly from Figma design
 *
 * @package Bonusovekody
 * @since 2.0.0
 */

/* ============================================
 * MAIN CONTAINER
 * ============================================ */

.post-hero-promo {
    margin-bottom: var(--space-6);
}

/* ============================================
 * HEADER (Logo + Title + Description)
 * ============================================ */

.post-hero-promo__header {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 32px;
}

/* Logo */
.post-hero-promo__logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3);
    overflow: hidden;
}

.post-hero-promo__logo-img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

/* Header Content */
.post-hero-promo__header-content {
    flex: 1;
    min-width: 0;
}

/* Title */
.post-hero-promo__title {
    margin: 0;
}

/* Description */
.post-hero-promo__description {
    font-size: 24px;
    line-height: 32px;
    margin: 0;
}

/* ============================================
 * MAIN CARD (Light Green Background)
 * ============================================ */

.post-hero-promo__card {
    background: #F3FDEC;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

/* ============================================
 * CODE + BUTTON ROW
 * ============================================ */

.post-hero-promo__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--space-5);
}

/* ============================================
 * PROMO CODE BOX
 * ============================================ */

.post-hero-promo__code-container {
    flex: 1;
    position: relative;
}

.post-hero-promo__code-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.post-hero-promo__code-wrapper a {
    text-decoration: none;
    display: block;
}

.post-hero-promo__code {
    background: var(--white);
    border: 1px dashed #666;
    border-radius: var(--radius-sm);
    padding: 0;
    text-align: center;
    position: relative;
    cursor: pointer;
}

.post-hero-promo__code input {
    width: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 500;
    color: var(--grey-600);
    padding: 11px 24px;
    outline: none;
    pointer-events: none;
}

/* Tooltip - "Kliknutím zkopírujete" */
.post-hero-promo__code::before {
    content: "Kliknutím zkopírujete";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: #1A1A1A;
    color: var(--white);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 16px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10;
}

/* Tooltip arrow */
.post-hero-promo__code::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: -2px;
    border: 6px solid transparent;
    border-top-color: var(--black);
    z-index: 10;
}

/* Hide tooltip when specified */
.post-hero-promo--hide-tooltip .post-hero-promo__code::before,
.post-hero-promo--hide-tooltip .post-hero-promo__code::after {
    display: none;
}

/* Hidden promo state - striped overlay */
.post-hero-promo--hide-promo .post-hero-promo__code {
    cursor: default;
    position: relative;
}

/* Hide tooltip arrow when promo is hidden */
.post-hero-promo--hide-promo .post-hero-promo__code::after {
    display: none !important;
}

/* Override tooltip ::before with striped overlay when promo is hidden */
.post-hero-promo--hide-promo .post-hero-promo__code::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(135deg, #fff, #fff 5px, #EAF2FD 5px, #EAF2FD 10px);
    pointer-events: none;
    z-index: 10;
    cursor: default;
    border-radius: var(--radius-sm);
    margin: 0;
    padding: 0;
    transform: none;
}

/* ============================================
 * CTA BUTTON
 * ============================================ */

.post-hero-promo__button {
    background: #37621A;
    text-decoration: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.post-hero-promo__button:hover {
    background: var(--green-800);
}

.post-hero-promo__button-icon {
    flex-shrink: 0;
}

/* ============================================
 * INFO ROW
 * ============================================ */

.post-hero-promo__info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
}

/* Verified Date */
.post-hero-promo__info-verified {
    color: #37621A;
    font-weight: 500;
}

/* License Verification */
.post-hero-promo__info-license {
    color: #1A1A1A;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.post-hero-promo__info-license img {
    flex-shrink: 0;
}

/* ============================================
 * FOOTER META & VERIFICATION
 * ============================================ */

.post-hero-promo__meta,
.post-hero-promo__verification {
    margin: 0;
}

.post-hero-promo__meta a,
.post-hero-promo__verification a {
    color: var(--grey-400);
    text-decoration: underline;
}

.post-hero-promo__meta a:hover,
.post-hero-promo__verification a:hover {
    color: var(--grey-600);
}

.post-hero-promo__verification {
    margin-bottom: 0;
}

/* ============================================
 * RESPONSIVE - MOBILE
 * ============================================ */

@media (max-width: 767px) {
    .post-hero-promo__header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-4);
        align-items: center;
    }

    .post-hero-promo__header-content {
        display: contents;
    }

    .post-hero-promo__title {
        flex: 1;
        min-width: 150px;
        font-size: 24px;
        line-height: 32px;
    }

    .post-hero-promo__description {
        font-size: 16px;
        line-height: 24px;
        margin-bottom: 5px;
    }

    .post-hero-promo__card {
        padding: var(--space-5);
    }

    .post-hero-promo__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .post-hero-promo__button {
        width: 100%;
    }

    .post-hero-promo__info {
        font-size: 14px;
        line-height: 20px;
        grid-template-columns: 1fr;
        gap: var(--space-3);
        text-align: center;
    }

    .post-hero-promo__info-license {
        text-align: center;
        justify-content: center;
    }

    .post-hero-promo__card {
        margin-bottom: 16px;
    }

    .post-hero-promo__meta,
    .post-hero-promo__verification {
        margin: 0;
        font-size: 14px;
        line-height: 24px;
    }
}
