/* Mobile Program Detail View
   Solves the "Modal on Mobile" issue by using a native-app like full screen layout
*/

.mobile-program-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    /* Default dark background */
    z-index: 9999;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 120px;
    /* Space for sticky footer */
    animation: slideUpMobile 0.3s ease-out;
}

@keyframes slideUpMobile {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Header */
.mp-header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mp-close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
}

/* Hero Section */
.mp-hero {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.mp-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--black) 100%);
}

/* Content Container */
.mp-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Typography */
.mp-title {
    font-family: var(--font-primary);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mp-subtitle {
    color: var(--gray-300);
    font-size: 1rem;
    line-height: 1.5;
}

/* Meta Data Pills */
.mp-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mp-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mp-badge svg {
    width: 16px;
    height: 16px;
    color: var(--primary-blue);
}

/* Accordions (Replacements for Tabs) */
.mp-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mp-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.mp-summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    /* Hide default arrow */
    color: var(--white);
}

.mp-summary::-webkit-details-marker {
    display: none;
}

.mp-summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.2s;
}

.mp-details[open] .mp-summary::after {
    transform: rotate(45deg);
}

.mp-accordion-content {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-300);
    line-height: 1.6;
}

/* Sticky Footer */
.mp-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 101;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.mp-price {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mp-price-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-transform: uppercase;
}

.mp-price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.mp-enroll-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(65, 105, 225, 0.4);
}

/* Brochure Download Button */
.mp-brochure-download {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--white);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.mp-brochure-download:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mp-brochure-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}


/* Light Mode Overrides */
body.light-mode .mobile-program-view {
    background: #f8f9fa;
}

body.light-mode .mp-header,
body.light-mode .mp-footer {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .mp-close-btn {
    color: var(--black);
}



body.light-mode .mp-subtitle {
    color: var(--gray-700);
}

body.light-mode .mp-badge {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--gray-800);
}

body.light-mode .mp-details {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .mp-summary {
    color: var(--gray-900);
}

body.light-mode .mp-accordion-content {
    color: var(--gray-700);
    border-top-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .mp-price-value {
    color: var(--primary-blue);
}

body.light-mode .mp-price-label {
    color: var(--gray-600);
}

body.light-mode #mpPriceTotal {
    color: var(--black) !important;
}

body.light-mode #mpPriceMonthly {
    color: var(--gray-600) !important;
}

body.light-mode .mp-currency-switch {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--black);
}

body.light-mode .mp-currency-switch span.active {
    color: var(--black) !important;
}

body.light-mode .mp-brochure-download {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

body.light-mode .mp-brochure-download:hover {
    background: var(--primary-blue);
    color: white;
}

/* Investment Section Classes */
.mp-section-title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: var(--white);
    font-weight: 700;
}

.mp-price-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mp-price-total {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
}

.mp-price-monthly-val {
    font-size: 1.5rem;
    color: var(--primary-blue);
    font-weight: 800;
}

.mp-finance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mp-finance-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mp-finance-title {
    font-weight: bold;
    margin-bottom: 0.2rem;
    color: var(--white);
    font-size: 0.9rem;
}

.mp-finance-desc {
    font-size: 0.8rem;
    opacity: 0.9;
    color: var(--white);
}

.mp-scholarship-card {
    background: url('../assets/img/scholarship_pastel_bg.png');
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    color: var(--gray-900);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Light Mode Overrides for Investment Section */


body.light-mode .mp-section-title {
    color: var(--black);
}

body.light-mode .mp-price-card {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-mode .mp-price-total {
    color: var(--black);
}

body.light-mode .mp-finance-card {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

body.light-mode .mp-finance-title {
    color: var(--black);
}

body.light-mode .mp-finance-desc {
    color: var(--gray-600);
}

/* Currency Toggle Switch */
.mp-currency-toggle-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2px;
    cursor: pointer;
    position: relative;
    width: 90px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mp-currency-toggle {
    position: absolute;
    /* Sliding background */
    left: 2px;
    top: 2px;
    width: 42px;
    height: 26px;
    background: var(--primary-blue);
    border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1;
}

.mp-currency-toggle-wrapper.usd-active .mp-currency-toggle {
    transform: translateX(44px);
}

.mp-currency-option {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
    user-select: none;
}

.mp-currency-option.active {
    color: white;
}

/* Light mode specific for toggle */
body.light-mode .mp-currency-toggle-wrapper {
    background: #e2e8f0;
    border-color: #cbd5e0;
}

body.light-mode .mp-currency-option {
    color: #718096;
}

body.light-mode .mp-currency-option.active {
    color: white;
}

/* Tooltips for Mobile Version Toggle */
.mp-info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 10px;
    cursor: pointer;
    position: relative;
    margin-left: 2px;
}

.mp-tooltip {
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background: #1f2937;
    color: white;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.3;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.mp-info-icon.show .mp-tooltip {
    visibility: visible;
    opacity: 1;
}

body.light-mode .mp-info-icon {
    background: rgba(0, 0, 0, 0.1);
    color: #4b5563;
}

body.light-mode .mp-tooltip {
    background: white;
    color: #1f2937;
    border-color: #e5e7eb;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Version Toggle Specifics */
.mp-version-toggle-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2px;
    cursor: pointer;
    position: relative;
    width: 160px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mp-version-pill {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 78px;
    height: 30px;
    background: var(--primary-blue);
    border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1;
}

.mp-version-toggle-wrapper.sin-vc-active .mp-version-pill {
    transform: translateX(78px);
}

/* Update tooltip position for outside placement */
.mp-info-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.mp-info-icon-wrapper .mp-tooltip {
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
}

/* Light mode for version toggle */
body.light-mode .mp-version-toggle-wrapper {
    background: #e2e8f0;
    border-color: #cbd5e0;
}