/* ==========================================================================
   CORE-DIRECT: Advanced Recurring Contribution & Progress Engine (HG-RCAE)
   Plum Theme Integrated - Elegant Dark/Sage Palette
   ========================================================================== */

:root {
    --core-gold: #D4AF37;
    --core-gold-light: rgba(212, 175, 55, 0.15);
    --core-gold-deep: #AA8B28;
    --core-sage: #7A8F81;
    --core-sage-light: rgba(122, 143, 129, 0.15);
    --core-sage-deep: #4E6154;
    --core-plum: #5D2E46;
    --core-plum-light: rgba(93, 46, 70, 0.1);
    --core-bg-dark: rgba(20, 24, 20, 0.95);
    --core-border: rgba(122, 143, 129, 0.2);
}

/* Recurring Toggle Container */
.recurring-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--core-border);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    transition: all 0.3s ease;
}
.recurring-toggle-container:hover {
    border-color: var(--core-gold);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.08);
}
.recurring-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.recurring-toggle-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}
.recurring-toggle-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Switch Styling */
.core-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.core-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.core-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.15);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.1);
}
.core-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
input:checked + .core-slider {
    background-color: var(--core-gold);
}
input:checked + .core-slider:before {
    transform: translateX(24px);
    background-color: #000;
}

/* Core Engine Section (Hidden by default) */
.core-engine-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
    opacity: 0;
    margin-top: 0;
}
.core-engine-section.open {
    max-height: 2000px;
    opacity: 1;
    margin-top: 20px;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

/* Model Selectors Grid */
.models-list-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--core-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 10px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 6px;
}
.model-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}
.model-card:hover {
    border-color: var(--core-sage);
    background: rgba(122, 143, 129, 0.05);
}
.model-card.selected {
    border-color: var(--core-gold);
    background: rgba(212, 175, 55, 0.08);
    box-shadow: inset 0 0 10px rgba(212,175,55,0.05);
}
.model-card-id {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--core-gold);
    margin-bottom: 4px;
}
.model-card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

/* Model Description Panel */
.model-description-panel {
    background: rgba(212, 175, 55, 0.05);
    border-left: 3px solid var(--core-gold);
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
}

/* Allocation Sliders */
.allocation-sliders-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--core-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.allocation-slider-row {
    margin-bottom: 16px;
}
.allocation-slider-row:last-child {
    margin-bottom: 0;
}
.slider-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
}
.slider-project-title {
    font-weight: 600;
    color: #ffffff;
}
.slider-project-percentage {
    color: var(--core-gold);
    font-weight: 700;
}
.slider-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.core-range-input {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: background 0.3s;
}
.core-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--core-gold);
    cursor: pointer;
    transition: transform 0.1s;
}
.core-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.slider-project-val {
    min-width: 60px;
    text-align: right;
    font-weight: 600;
    color: #ffffff;
}

/* Zeffy Iframe Embed */
.zeffy-embed-container {
    width: 100%;
    height: 580px;
    border-radius: 12px;
    border: 1px solid var(--core-border);
    overflow: hidden;
    background: #000;
    margin-top: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.zeffy-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Real-Time Live Feed Notification */
.live-notification-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(20, 24, 20, 0.95);
    border: 1px solid var(--core-gold);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.6);
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.live-notification-toast.show {
    transform: translateY(0);
    opacity: 1;
}
.live-notification-icon {
    font-size: 1.8rem;
    color: var(--core-gold);
    animation: pulseIcon 1.5s infinite;
}
.live-notification-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.live-notification-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--core-gold);
}
.live-notification-message {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
}

/* Estimate projections badge */
.completion-projection-badge {
    background: rgba(122, 143, 129, 0.1);
    border: 1px dashed var(--core-sage);
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 12px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    color: var(--color-sage-deep);
}

@keyframes pulseIcon {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); text-shadow: 0 0 10px rgba(212,175,55,0.4); }
    100% { transform: scale(1); }
}
