/* Enhanced Program Selection Styles */

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast-notification {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    margin-bottom: 10px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    min-width: 280px;
    position: relative;
    overflow: hidden;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.hide {
    transform: translateX(400px);
    opacity: 0;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.toast-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.toast-text {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 2px 0;
}

.toast-message {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.toast-close:hover {
    opacity: 1;
}

.toast-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: toastShimmer 2s ease-in-out;
}

@keyframes toastShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Price Summary Container - HIDDEN */
.price-summary-container {
    display: none !important;
    visibility: hidden !important;
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #2196f3;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.2);
    z-index: -1;
    min-width: 280px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.price-summary-container.show {
    display: none !important;
    visibility: hidden !important;
    transform: translateX(400px);
    opacity: 0;
}

.price-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.price-summary-title {
    font-weight: 600;
    color: #1565c0;
    margin: 0;
    font-size: 16px;
}

.price-close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.price-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.price-details {
    margin-bottom: 15px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.price-label {
    color: #666;
}

.price-value {
    font-weight: 600;
    color: #333;
}

.price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 2px solid #2196f3;
    margin-top: 15px;
}

.price-total-label {
    font-weight: 600;
    color: #1565c0;
    font-size: 16px;
}

.price-total-value {
    font-weight: 700;
    color: #2196f3;
    font-size: 20px;
    animation: pricePulse 2s ease-in-out infinite;
}

@keyframes pricePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.price-update-animation {
    animation: priceUpdate 0.6s ease;
}

@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background: #e3f2fd; }
    100% { transform: scale(1); }
}

/* Selection Indicator */
.program-selection-indicator {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    border: 2px solid #2196f3;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0 30px 0;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.15);
    position: relative;
    overflow: hidden;
}

.program-selection-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.selection-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.selection-icon {
    background: #2196f3;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.selection-info {
    flex: 1;
}

.selection-info h4 {
    margin: 0 0 5px 0;
    color: #1565c0;
    font-weight: 600;
    font-size: 18px;
}

.selection-info p {
    margin: 0;
    color: #1976d2;
    font-size: 14px;
    opacity: 0.9;
}

.btn-change-program {
    background: #2196f3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-change-program:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Selected Program Styling - Simple Date Selection Style */
.course-card.program-selected {
    position: relative;
    border: 2px solid #5ba17a !important;
    background: linear-gradient(135deg, #f0f8f4 0%, #e8f5e8 100%) !important;
    box-shadow: 0 4px 15px rgba(91, 161, 122, 0.2) !important;
}

.selected-badge {
    animation: badgeSlideIn 0.4s ease, badgePulse 2s ease-in-out infinite 1s;
}

@keyframes badgeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Enhanced Course Card Hover Effects */
.course-card {
    transition: all 0.3s ease;
    position: relative;
}

.course-card:not(.program-selected):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(91, 161, 122, 0.15);
}

/* Program Selection Animation States */
.program-hiding {
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
}

.program-showing {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Read More Button Enhancement */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .selection-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .selection-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .selection-info h4 {
        font-size: 16px;
    }
    
    .selection-info p {
        font-size: 13px;
    }
    
    .btn-change-program {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .selected-badge {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast-notification {
        min-width: auto;
        margin: 0 0 10px 0;
    }
    
    .price-summary-container {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .price-summary-container.show {
        transform: translateY(0);
    }
    
    .price-summary-container {
        transform: translateY(-100px);
    }
}

/* Smooth Transitions for All Elements */
* {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Focus States for Accessibility */
.btn-change-program:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Loading State */
.program-selection-loading {
    opacity: 0.6;
    pointer-events: none;
}

.program-selection-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #2196f3;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Visual Feedback */
.course-card.program-selected .btn {
    background: #4caf50 !important;
    border-color: #4caf50 !important;
}

.course-card.program-selected .btn:hover {
    background: #45a049 !important;
    border-color: #45a049 !important;
}

/* Subtle Animation for Non-Selected Programs */
.course-card:not(.program-selected) {
    filter: grayscale(0);
    transition: filter 0.3s ease;
}

.program-selection-indicator ~ .course-card:not(.program-selected) {
    filter: grayscale(0.3);
    opacity: 0.7;
}

/* Success State Animation */
.program-selected-success {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Enhanced Program Card Pricing */
.program-price-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    z-index: 5;
    animation: priceFloat 3s ease-in-out infinite;
}

@keyframes priceFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.program-price-badge::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #f7931e;
}

/* Interactive Hover Effects */
.course-card {
    position: relative;
    overflow: visible;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(91, 161, 122, 0.05) 0%, rgba(74, 140, 106, 0.05) 100%);
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.course-card:hover::before {
    opacity: 1;
}

/* Simple Radio Button Style Indicator */
.course-card .selection-radio-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: white;
    z-index: 10;
    transition: all 0.3s ease;
}

.course-card.program-selected .selection-radio-indicator {
    border-color: #5ba17a;
}

.course-card.program-selected .selection-radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #5ba17a;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Button Enhancement */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Smooth Transitions */
.course-card, .btn, .toast-notification, .price-summary-container {
    will-change: transform, opacity;
}

/* Loading Spinner for Price Updates */
.price-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

/* Simple Radial Selection Indicator - Date Selection Style */
.course-card.program-selected {
    position: relative;
    border: 2px solid #5ba17a !important;
    background: linear-gradient(135deg, #f0f8f4 0%, #e8f5e8 100%) !important;
    box-shadow: 0 4px 15px rgba(91, 161, 122, 0.2) !important;
}

/* Simple Radio Button Style Indicator */
.selection-radio-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    border: 2px solid #5ba17a;
    border-radius: 50%;
    background: white;
    z-index: 10;
}

.selection-radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #5ba17a;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
}