/* 
 * Stack & Escape Risk Manager - Main CSS - Revised Version
 */

/* Global Styles */
.serm-container {
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

/* Module Cards */
.serm-module {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Step Indicators */
.serm-step-indicator {
    margin-bottom: 1rem;
}

.serm-step-indicator .w-8 {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
}

/* Input Styling */
.serm-input-group {
    margin-bottom: 1rem;
}

.serm-input-group input,
.serm-input-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: border-color 0.2s ease;
}

.serm-input-group input:focus,
.serm-input-group select:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.serm-input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* Result Tags */
.serm-result-item {
    margin-bottom: 0.5rem;
}

.serm-result-item span[id] {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    color: white;
}

/* Stop Loss and Take Profit Styling */
.serm-stop-loss .p-3,
.serm-take-profit .p-3 {
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.serm-take-profit .p-3:last-child {
    border: 1px solid #fdba74;
}

/* Risk/Reward Graph */
.serm-rr-graph .relative {
    height: 2rem;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
}

.serm-rr-graph .absolute {
    position: absolute;
    height: 100%;
}

.serm-rr-graph .flex {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Circuit Breaker Warning */
#circuit-breaker-warning {
    background-color: #fee2e2;
    color: #b91c1c;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-top: 1rem;
}

#circuit-breaker-warning p:first-child {
    font-weight: 500;
}

/* Risk Meter */
.risk-meter-indicator {
    position: absolute;
    height: 100%;
    width: 2px;
    background-color: black;
    transition: left 0.3s ease;
}

/* Compounding Table */
.serm-compounding table {
    width: 100%;
    border-collapse: collapse;
}

.serm-compounding th {
    background-color: #f8fafc;
    font-weight: 600;
    text-align: left;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.serm-compounding td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.serm-compounding tr:last-child td {
    border-bottom: none;
}

/* Quotes */
.serm-quote-header,
.serm-quote-footer {
    background-color: #f1f5f9;
    border-radius: 1rem;
    padding: 1rem;
    font-style: italic;
    text-align: center;
}

.serm-quote-footer .serm-cta {
    margin-top: 1rem;
}

.serm-quote-footer .serm-cta a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #38bdf8;
    color: white;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.serm-quote-footer .serm-cta a:hover {
    background-color: #0ea5e9;
}

/* Buttons */
button {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
    font-weight: 500;
    border-radius: 0.5rem;
}

button:hover {
    opacity: 0.9;
}

/* Fade Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.serm-quote-header p,
.serm-quote-footer p {
    animation: fadeIn 1s ease-in-out;
}

/* Weekday indicator */
#current-weekday {
    font-weight: 600;
}
