/* ====================================
   PORTFOLIO CONFIGURATOR - METHOD STYLES
   ==================================== */

/* Configurator Description */
.configurator-description {
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.25;
    letter-spacing: -0.32px;
    color: var(--color-primary);
    max-width: 636px;
    margin: 0 auto;
}

/* Configurator Container */
.configurator-container {
    /*max-width: 1080px;*/
    /*margin: 0 auto;*/
}

/* Card Components */
.card {
    background-color: #F5F5F5;
    border-radius: 15px;
    margin-bottom: 27px;
    overflow: hidden;
}

.card-header {
    background-color: #999999;
    color: white;
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    text-align: center;
    padding: 15px;
    margin: 0;
}

.card-body {
    padding: 24px 32px;
}

/* ==========================================
   ACCORDION STRUCTURE
   ========================================== */

.accordion {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.accordion-item {
    width: 100%;
}

.accordion-header {
    width: 100%;
    border: none;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    transition: var(--transition-smooth);
}

.accordion-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

.accordion-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.accordion-chevron {
    font-size: 1.5rem;
    margin-left: 20px;
}

/* Account header colors are now applied dynamically via inline styles */

.accordion-header:hover {
    opacity: 0.9;
}

.accordion-title {
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 500;
    font-size: 1.8rem;
    line-height: 29px;
    margin: 0;
}

.accordion-subtitle {
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    line-height: 40px;
    margin: 0;
}

.accordion-content {
    padding-top: 32px;
}

/* ==========================================
   PORTFOLIO SUMMARY
   ========================================== */

.portfolio-summary-card .card-body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.portfolio-chart {
    max-width: 300px !important;
    width: 300px !important;
    height: 300px !important;
    border-radius: 8px;
}

/* Force consistent chart dimensions across all accounts */
canvas.portfolio-chart {
    width: 300px !important;
    height: 300px !important;
}

/* ==========================================
   CONFIGURATION PANELS
   ========================================== */

.config-panels-wrapper {
    display: flex;
    gap: 13px;
    margin-bottom: 27px;
}

.config-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.config-panel .card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.config-panel .card-body {
    flex: 1;
}

.portfolio-category {
    margin-bottom: 24px;
}

.portfolio-category:last-child {
    margin-bottom: 0;
}

.category-title {
    background-color: #d9d9d9;
    border-radius: 15px;
    padding: 3px 11px;
    font-family: 'Wix Madefor Display', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--color-primary);
}

/* ==========================================
   FORM COMPONENTS
   ========================================== */

.form-group {
    display: flex;
    align-items: center;
    /*justify-content: space-between;*/
    gap: 16px;
    margin-bottom: 1px;
}

.form-group-column {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.form-label {
    font-family: 'Wix Madefor Display', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 40px;
    flex-shrink: 0;
    width: 154px;
    color: var(--color-primary);
}

.form-label-inline {
    width: auto;
    line-height: 36px;
}

.label-text {
    line-height: 1.2;
    display: inline-block;
}

/* Checkbox styling for account selection */
/*.form-check-input {*/
/*    width: 16px;*/
/*    height: 16px;*/
/*    border-radius: 4px;*/
/*    border: 1px solid #E1E1E1;*/
/*    background-color: #FFFFFF;*/
/*    cursor: pointer;*/
/*    margin: 0;*/
/*}*/

.form-check-input:checked {
    background-color: #666666; /* Grey background */
    border-color: #666666;
    /* Force white tick for consistent look */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23FFFFFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M4 8l3 3 6-6'/%3e%3c/svg%3e");
}

/* Custom Select */
.custom-select {
    background-color: white;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 121px;
    height: 37px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--color-primary);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.custom-select:focus {
    outline: none;
    border-color: #748a90;
}

/* Fund dropdown alignment - match label width for Index Tracker */
.width-150 {
    width: 154px;
    flex-shrink: 0;
}

/* ==========================================
   SLIDER COMPONENTS
   ========================================== */

.slider-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 23px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 7px;
    background-color: white;
    border: 1px solid var(--color-primary);
    border-radius: 3px;
}

.slider-progress {
    position: absolute;
    height: 7px;
    width: 0%;
    background-color: #090909;
    border: 1px solid var(--color-primary);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

.slider-thumb {
    position: absolute;
    left: 0%;
    transform: translateX(-50%);
    width: 6px;
    height: 23px;
    background-color: #090909;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 2;
}

.slider-thumb:hover {
    transform: translateX(-50%) scale(1.1);
}

.percentage-input {
    background-color: white;
    border: 1px solid #090909;
    border-radius: 5px;
    padding: 5px 10px;
    width: 53px;
    height: 40px;
    text-align: center;
    font-family: 'Wix Madefor Display', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.percentage-input:focus {
    outline: none;
    border-color: #748a90;
}

/* ==========================================
   FACTSHEETS SECTION
   ========================================== */

.factsheets-card .card-body {
    padding: 20px 32px;
}

.factsheet-text {
    text-align: center;
    font-family: 'Wix Madefor Display', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
    color: var(--color-primary);
}

.factsheet-text.no-factsheets {
    padding: 30px 20px;
    font-style: italic;
    color: #999999;
}

.factsheet-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.factsheet-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.factsheet-link:hover {
    background-color: #f8f9fa;
    border-color: var(--color-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.factsheet-icon {
    color: #d32f2f;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.factsheet-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    flex-grow: 1;
}

.factsheet-link a:hover {
    color: #748a90;
    text-decoration: underline;
}

/* ==========================================
   ALLOCATION WARNING
   ========================================== */

.allocation-warning {
    background-color: #ffa726;
    border: 1px solid #ff9800;
    border-radius: 8px;
    margin: 20px 0;
    padding: 0;
    position: relative;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.2);
    animation: slideDown 0.3s ease-out;
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.warning-icon {
    color: #ffffff;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.warning-text {
    color: #ffffff;
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    flex-grow: 1;
}

.warning-text strong {
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.allocation-warning.fade-out {
    animation: slideUp 0.3s ease-in forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
}

/* Navigation Buttons */
.btn-back, .btn-next {
    min-width: 180px;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 992px) {
    .config-panels-wrapper {
        flex-direction: column;
    }
    
    .configurator-container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .form-label {
        width: 100%;
        text-align: left;
        line-height: 1.5;
    }
    
    .configurator-description {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .accordion-title {
        font-size: 1.5rem;
    }
    
    .accordion-subtitle {
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 16px 20px;
    }
    
    .slider-group {
        gap: 12px;
    }
    
    .custom-select {
        width: 100%;
    }
    
    /* Navigation on mobile */
    .page-navigation .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-back, .btn-next {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.25rem;
    }
    
    .accordion-title {
        font-size: 1.25rem;
    }
    
    .category-title {
        font-size: 0.875rem;
    }
    
    .form-label {
        font-size: 0.875rem;
    }
    
    .percentage-input {
        width: 48px;
        font-size: 0.875rem;
    }
}
