/* Member Calculator Frontend CSS - Generic & Light Design */

/* CSS Variables for easy customization */
.member-calculator {
    --primary-color: #3b82f6;
    --primary-light: rgba(59, 130, 246, 0.1);
    --primary-lighter: rgba(59, 130, 246, 0.05);
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --background: #ffffff;
    --light-bg: #f9fafb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

/* Custom Color Support */
.member-calculator.has-custom-color {
    --primary-color: var(--accent-color, #3b82f6);
    --primary-light: rgba(var(--accent-color-rgb, 59, 130, 246), 0.1);
    --primary-lighter: rgba(var(--accent-color-rgb, 59, 130, 246), 0.05);
}

/* Base Container - Generic Design */
.member-calculator {
    max-width: 100%;
    width: 100%;
    max-width: 600px;
    padding: 2.5rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-family: inherit;
    line-height: 1.6;
    box-sizing: border-box;
}

/* Title - Simple and generic */
.member-calculator h3 {
    margin: 0 0 2rem 0;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 1rem;
}

/* Formular - Clean Layout */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
}

.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: calc(var(--radius) - 4px);
    font-size: 1rem;
    background: var(--background);
    color: var(--text-color);
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23666" d="M6 9L1.5 4.5h9L6 9z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group select:hover {
    border-color: var(--primary-color);
}

/* Result Section - Light Design */
.result {
    margin-top: 2rem;
	padding: 2rem 2rem 0 2rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: calc(var(--radius) - 4px);
    border-left: 4px solid var(--primary-color);
}

.result-title {
    margin: 0 0 1.5rem 0;
    color: var(--primary-color);
    font-size: 1.125rem;
    font-weight: 600;
}

/* Amounts - Clear Layout */
.amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.amount-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.amount-row.total {
    border-top: 2px solid var(--primary-color);
    margin-top: 1rem;
    padding-top: 1rem;
    font-weight: 600;
    background: var(--primary-lighter);
    margin-left: -2rem;
    margin-right: -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    border-radius: 0 0 calc(var(--radius) - 8px) calc(var(--radius) - 8px);
}

.amount-row .label {
    color: var(--text-color);
    font-weight: 500;
    flex: 1;
    font-size: 1rem;
}

.amount-row .amount {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.125rem;
    text-align: right;
    margin-left: 1rem;
}

.amount-row.total .amount {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.shares-info {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 400;
    display: block;
    text-align: right;
    margin-top: 0.25rem;
    font-style: italic;
	display:inline-block;
	margin-left:4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .member-calculator {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: calc(var(--radius) - 4px);
    }
    
    .member-calculator h3 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group select {
        padding: 0.875rem;
    }
    
    .result {
        padding: 1.5rem;
    }
    
    .amount-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .amount-row .amount {
        margin-left: 0;
        text-align: left;
        font-size: 1rem;
    }
    
    .amount-row.total .amount {
        font-size: 1.125rem;
    }
    
    .amount-row.total {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .shares-info {
        text-align: left;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .member-calculator {
        box-shadow: none;
        border: 1px solid #ccc;
        margin: 1rem 0;
        background: white;
    }
    
    .result {
        background: white;
        border: 1px solid #ccc;
    }
}
