/**
 * Invest Module Styles
 * Page-specific styles for the investment portfolio simulator
 */

/* Input Group Variants */
.input-group.amount {
    width: 150px;
    flex-shrink: 0;
}

.input-group.duration {
    flex: 1;
}

/* Duration Buttons */
.duration-options {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
}

.duration-btn {
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.duration-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.duration-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Profile Buttons */
.profile-options {
    display: flex;
    gap: 0.5rem;
}

.profile-btn {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.profile-btn:hover {
    border-color: var(--accent);
}

.profile-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.profile-btn .profile-name {
    font-weight: 600;
    display: block;
}

.profile-btn .profile-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Instruments */
.instruments-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.instrument-group {
    background: var(--bg-input);
    border-radius: 4px;
    padding: 0.3rem 0.4rem;
}

.group-header {
    border-left: 2px solid var(--accent);
    padding-left: 0.4rem;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.group-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.group-instruments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.instrument-item {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.3rem;
    background: var(--bg-card);
    border-radius: 3px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
    font-size: 0.75rem;
    line-height: 1.2;
}

.instrument-item:hover {
    border-color: var(--bg-hover);
}

.instrument-item.disabled {
    opacity: 0.4;
}

.instrument-checkbox {
    width: 12px;
    height: 12px;
    accent-color: var(--accent);
    cursor: pointer;
    margin: 0;
}

.instrument-name {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.instrument-percentage {
    width: 28px;
    padding: 0 0.15rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: right;
    height: 18px;
    line-height: 18px;
}

.instrument-percentage:focus {
    outline: none;
    border-color: var(--accent);
}

.percent-symbol {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.7rem;
}

/* Button variant: success */
.btn-success {
    background: var(--accent);
    color: white;
}

.btn-success:hover {
    background: var(--accent-hover);
}

/* Chart container height override */
.chart-container {
    height: 350px;
}

/* Summary */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.summary-item {
    background: var(--bg-input);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    text-align: center;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

.summary-value.highlight {
    color: #fbbf24;
}

/* Allocation Bar */
.allocation-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin-top: 1rem;
    overflow: hidden;
    display: flex;
}

.allocation-segment {
    height: 100%;
    transition: width 0.3s;
}

.allocation-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.allocation-total {
    color: var(--text-secondary);
}

.allocation-total.over {
    color: var(--color-error);
}

.allocation-total.ok {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .input-group.amount {
        width: 100%;
    }

    .duration-options {
        flex-wrap: wrap;
    }

    .profile-options {
        flex-direction: column;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}

