/**
 * Options Calculator CSS
 */

/* General Styles */
.options-calculator {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.options-calculator * {
    box-sizing: border-box;
}

.options-calculator h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.options-calculator h3 {
    margin: 15px 0;
    color: #444;
    font-size: 18px;
    font-weight: 500;
}

/* Input Section */
.options-calculator-input {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.options-calculator-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 15px;
}

.options-calculator-col {
    flex: 1;
    min-width: 200px;
    padding: 0 10px;
}

.options-calculator label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.options-calculator input[type="text"],
.options-calculator input[type="number"],
.options-calculator select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.options-calculator button {
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.options-calculator button:hover {
    background-color: #005a87;
}

.options-calculator button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Stock Position */
.stock-position {
    background-color: #f0f7ff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid #0073aa;
}

.stock-position h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Options Chain */
.options-chain {
    margin-top: 20px;
    overflow-x: auto;
}

.options-chain table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.options-chain th {
    background-color: #f2f2f2;
    padding: 10px;
    text-align: left;
    font-weight: 500;
    border-bottom: 2px solid #ddd;
}

.options-chain td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.options-chain tr:hover {
    background-color: #f9f9f9;
}

.options-chain .bid, .options-chain .ask {
    cursor: pointer;
    font-weight: 500;
    color: #0073aa;
}

.options-chain .bid:hover, .options-chain .ask:hover {
    text-decoration: underline;
}

/* Results Section */
.options-calculator-results {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    margin-top: 30px;
}

.result-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 500;
    color: #666;
}

.result-value {
    font-weight: 600;
    color: #333;
    float: right;
}

.result-value.profit {
    color: #0c9b43;
}

.result-value.loss {
    color: #d32f2f;
}

/* Charts */
.chart-container {
    height: 400px;
    margin-top: 30px;
}

/* P/L Table */
.pl-table {
    overflow-x: auto;
    margin-top: 30px;
}

.pl-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.pl-table th {
    background-color: #f2f2f2;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.pl-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.pl-table tr:first-child th {
    background-color: #e6e6e6;
}

.pl-table .profit {
    color: #0c9b43;
}

.pl-table .loss {
    color: #d32f2f;
}

/* Calculator Home */
.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.calculator-card {
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.calculator-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.calculator-card p {
    color: #666;
    margin-bottom: 15px;
}

.calculator-card .button {
    display: inline-block;
    background-color: #0073aa;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.calculator-card .button:hover {
    background-color: #005a87;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .options-calculator-row {
        flex-direction: column;
    }
    
    .options-calculator-col {
        margin-bottom: 15px;
    }
    
    .result-value {
        display: block;
        float: none;
        margin-top: 5px;
    }
}
