/* ==========================================
   LearnPop Purchase Panel
========================================== */

.learnpop-purchase-panel {
    width: 100%;
    margin-top: 22px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #dfe8e8;
    border-radius: 16px;
    box-sizing: border-box;
    box-shadow: 0 5px 18px rgba(35, 65, 64, 0.08);
}

/* ==========================================
   Price
========================================== */

.learnpop-panel-price {
    margin: 0 0 18px;
    color: #222222;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
}

/* ==========================================
   Hidden genuine EDD controls
========================================== */

.learnpop-purchase-panel .learnpop-purchase-wrap {
    position: relative;
    width: 100%;
    margin: 0;
}

.learnpop-purchase-panel .learnpop-native-purchase {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.learnpop-purchase-panel
.learnpop-native-purchase
.edd_go_to_checkout,
.learnpop-purchase-panel
.learnpop-native-purchase
.edd-cart-ajax-alert {
    display: none !important;
}

/* ==========================================
   Visible Add to Cart button
========================================== */

.learnpop-purchase-panel
.learnpop-custom-cart-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 52px;
    margin: 0 !important;
    padding: 12px 18px !important;
    background: #96d1cf !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-sizing: border-box;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: none !important;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.learnpop-purchase-panel
.learnpop-custom-cart-button:hover,
.learnpop-purchase-panel
.learnpop-custom-cart-button:focus {
    background: #79c4c1 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.learnpop-purchase-panel
.learnpop-custom-cart-button.is-loading {
    opacity: 0.8;
    cursor: wait;
}

.learnpop-purchase-panel
.learnpop-custom-cart-button.is-in-cart {
    background: #579895 !important;
    opacity: 1;
    cursor: default;
    transform: none;
}

/* ==========================================
   Purchase benefits
========================================== */

.learnpop-panel-benefits {
    display: grid;
    gap: 9px;
    margin-top: 18px;
    color: #4f5959;
    font-size: 14px;
    line-height: 1.35;
}

.learnpop-panel-benefits > div {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
}

.learnpop-panel-benefits span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    background: #e7f5f4;
    border-radius: 50%;
    color: #4f8c89;
    font-size: 12px;
    font-weight: 900;
}

/* Remove unwanted theme spacing */

.learnpop-panel-benefits p,
.learnpop-panel-benefits br {
    display: none !important;
}

/* ==========================================
   Resource Details
========================================== */

.learnpop-panel-details {
    display: block;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e1e9e9;
}

/* Add the section heading automatically */

.learnpop-panel-details::before {
    content: "Resource Details";
    display: block;
    margin: 0 0 8px;
    color: #4f5959;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Each item is now one compact row, not a card */

.learnpop-panel-detail {
    display: grid;
    grid-template-columns: minmax(110px, 34%) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 10px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #edf1f1;
    border-radius: 0;
    box-sizing: border-box;
}

.learnpop-panel-detail:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.learnpop-panel-detail-label {
    display: block;
    margin: 0;
    padding: 0;
    color: #687575;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.learnpop-panel-detail-value {
    display: block;
    margin: 0;
    padding: 0;
    color: #303737;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

/* Stop Eduacademy from inserting visible gaps */

.learnpop-panel-detail p {
    display: contents;
    margin: 0 !important;
    padding: 0 !important;
}

.learnpop-panel-detail br {
    display: none !important;
}

/* ==========================================
   Notice
========================================== */

.learnpop-panel-notice {
    padding: 15px;
    background: #fff7e8;
    border: 1px solid #f0d7a4;
    border-radius: 10px;
    color: #6d5428;
    font-size: 14px;
    line-height: 1.5;
}

/* ==========================================
   Mobile
========================================== */

@media (max-width: 700px) {

    .learnpop-purchase-panel {
        margin-top: 18px;
        padding: 18px;
        border-radius: 13px;
    }

    .learnpop-panel-price {
        margin-bottom: 15px;
        font-size: 28px;
    }

    .learnpop-purchase-panel
    .learnpop-custom-cart-button {
        min-height: 48px;
        padding: 11px 14px !important;
        font-size: 15px !important;
    }

    .learnpop-panel-benefits {
        margin-top: 15px;
        font-size: 13px;
    }

    .learnpop-panel-details {
        margin-top: 18px;
        padding-top: 15px;
    }

    .learnpop-panel-details::before {
        font-size: 12px;
    }

    .learnpop-panel-detail {
        grid-template-columns: 1fr;
        gap: 3px;
        padding: 9px 0;
    }

    .learnpop-panel-detail-label {
        font-size: 11px;
    }

    .learnpop-panel-detail-value {
        font-size: 13px;
    }
}