/**
 * OE LOGO Placement Shortcode Styles (Logo + Programs with CTA Button)
 * Modeled after OE searchbox search results with enlarged logos and stacked programs.
 */

.oe-logo-placement-container {
    width: 100%;
    margin: 35px auto;
    font-family: sans-serif;
    color: #013159;
    box-sizing: border-box;
}

.oe-logo-placement-container * {
    box-sizing: border-box;
}

/* Placement Heading (Optional) */
.oe-logo-heading {
    font-size: 32px;
    font-weight: 700;
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 0;
    padding: 24px 0;
    line-height: 1.3;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    background-color: #013159;
}

.oe-logo-wrapper {
    width: 100%;
}

/* Schools List */
.oe-logo-schools-list {
    display: flex;
    flex-direction: column;
}

/* School Card */
.oe-logo-school-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 0;
    box-shadow: 0 2px 10px rgba(1, 49, 89, 0.05);
    display: flex;
    align-items: center;
    padding: 18px 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.oe-logo-school-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 20px rgba(1, 49, 89, 0.09);
    background-color: #f3f3f3;
}

/* School Logo Column (enlarged width and height compared to Sechel) */
.oe-logo-school-logo {
    flex: 0 0 230px;
    width: 230px;
    max-width: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 24px;
    text-align: center;
    min-height: 80px;
}

.oe-logo-school-logo img {
    max-width: 210px;
    max-height: 85px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.oe-logo-school-name-fallback {
    font-size: 17px;
    font-weight: 700;
    color: #013159;
    text-align: center;
    line-height: 1.3;
}

/* Programs Column (stacked programs without school name header or carats) */
.oe-logo-programs-content {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 24px;
}

.oe-logo-programs-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

/* Individual Program Row */
.oe-logo-programs-list li.oe-logo-program-row {
    padding: 10px;
}

.oe-logo-program-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    list-style: none !important;
}

/* .oe-logo-program-row:hover {
    background-color: #f3f3f3;
} */

.oe-logo-program-row:first-child {
    padding-top: 2px;
}

.oe-logo-program-row:last-child {
    padding-bottom: 2px;
    border-bottom: none;
}

/* Program Name */
.oe-logo-program-info {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.oe-logo-program-name {
    font-size: 16px;
    color: #013159;
    line-height: 1.35;
    display: block;
    text-decoration: none;
    word-break: break-word;
}

/* CTA Button Column */
.oe-logo-program-cta {
    flex-shrink: 0;
    text-align: right;
}

/* BSchools-styled Call to Action Button */
.oe-logo-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 24px;
    background-color: #FFFFFF;
    color: #000000 !important;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 6px;
    text-decoration: none !important;
    border: 1px solid #0290a8;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1.2;
    box-shadow: 0 2px 5px rgba(2, 144, 168, 0.2);
}

.oe-logo-cta-button:hover,
.oe-logo-cta-button:focus {
    background-color: #0290a8;
    border-color: #0290a8;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(1, 49, 89, 0.25);
    transform: translateY(-1px);
}

/* Sponsored Footer Bar */
.oe-logo-sponsored-bar {
    padding: 8px 6px 0 6px;
    text-align: right;
    position: relative;
}

.oe-logo-sponsored-label {
    display: inline-block;
}

.oe-logo-sponsor-trigger {
    color: #94a3b8 !important;
    font-size: 11px;
    font-style: italic;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.oe-logo-sponsor-trigger:hover {
    color: #013159 !important;
}

/* Sponsored Modal Popup */
.oe-logo-popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.oe-logo-popup-modal.is-active {
    display: flex;
}

.oe-logo-popup-content {
    background: #ffffff;
    max-width: 480px;
    width: 90%;
    padding: 24px 28px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: left;
    animation: oeLogoFadeIn 0.2s ease-out;
}

@keyframes oeLogoFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.oe-logo-close-popup {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 24px;
    font-weight: 300;
    color: #64748b;
    text-decoration: none !important;
    line-height: 1;
    cursor: pointer;
}

.oe-logo-close-popup:hover {
    color: #0f172a;
}

.oe-logo-popup-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
}

.oe-logo-popup-content p a {
    color: #0290a8;
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .oe-logo-placement-container {
        margin: 25px auto;
        padding: 0 12px;
    }

    .oe-logo-school-card {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 16px;
    }

    .oe-logo-school-logo {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        padding-right: 0;
        padding-bottom: 14px;
        min-height: auto;
    }

    .oe-logo-school-logo img {
        max-width: 190px;
        max-height: 75px;
    }

    .oe-logo-programs-content {
        padding-left: 0;
        padding-top: 12px;
        width: 100%;
    }

    .oe-logo-program-row {
        flex-direction: column;
    }

    .oe-logo-program-row {
        gap: 12px;
        padding: 10px 0;
    }

    .oe-logo-cta-button {
        padding: 8px 18px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .oe-logo-program-row {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 8px;
        padding: 12px 0;
    }

    .oe-logo-program-info {
        text-align: center;
    }

    .oe-logo-program-cta {
        text-align: center;
        width: 100%;
    }

    .oe-logo-cta-button {
        width: 100%;
        padding: 9px 16px;
    }
}
