/* --- START OF FILE price-elasticity-of-demand-calculator.css --- */

/* General Tool Styling */
.ped-calculator-tool {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.ped-container {
    max-width: 700px;
    margin: 0 auto;
}

.ped-title {
    text-align: center;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.ped-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* Form Styling */
.ped-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.ped-fieldset {
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    padding: 20px;
    margin: 0;
}

.ped-fieldset legend {
    padding: 0 10px;
    font-weight: 600;
    color: #34495e;
    font-size: 1.1rem;
}

.ped-input-group {
    display: flex;
    flex-direction: column;
}

.ped-input-group:not(:last-child) {
    margin-bottom: 15px;
}

.ped-input-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.ped-input-group input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.ped-input-group input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* Buttons */
.ped-button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.ped-button {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.ped-button-primary {
    background-color: #2980b9;
    color: white;
}

.ped-button-primary:hover {
    background-color: #3498db;
    transform: translateY(-2px);
}

.ped-button[type="reset"] {
    background-color: #ecf0f1;
    color: #333;
    border: 1px solid #bdc3c7;
}

.ped-button[type="reset"]:hover {
    background-color: #dde1e2;
}

/* Error Message */
.ped-error-message {
    color: #c0392b;
    background-color: #f9e2e1;
    border: 1px solid #e74c3c;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    margin-top: 15px;
    display: none; /* Hidden by default */
}

/* Results Section */
.ped-results-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: none; /* Hidden by default */
}

.result-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.result-value {
    text-align: center;
}

.result-value .label {
    font-size: 1rem;
    color: #6c757d;
}

.result-value .value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2980b9;
}

.result-value .type {
    font-size: 1.2rem;
    font-weight: 600;
    color: #34495e;
}

.result-breakdown {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}
.breakdown-item:not(:last-child){
    margin-bottom: 8px;
}
.breakdown-item .label {
    color: #555;
}

.breakdown-item .value {
    font-weight: 600;
    color: #333;
}

.result-interpretation {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.result-interpretation h3 {
    margin-top: 0;
    color: #34495e;
}

.result-interpretation p {
    color: #555;
    line-height: 1.6;
}

/* Elasticity Scale (Visual Indicator) */
.elasticity-scale {
    margin-top: 25px;
    width: 100%;
}

.elasticity-scale h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #34495e;
    font-weight: 600;
}

.scale-bar {
    display: flex;
    height: 30px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #bdc3c7;
}

.scale-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 500;
    font-size: 0.8rem;
    text-align: center;
    background-color: #ecf0f1;
    color: #7f8c8d;
    transition: all 0.5s ease;
}
.scale-segment.inelastic { background-color: #e74c3c; }
.scale-segment.unit { background-color: #f39c12; }
.scale-segment.elastic { background-color: #2ecc71; }

/* Active State for Scale */
.scale-segment.active {
    font-weight: 700;
    transform: scale(1.05);
    z-index: 1;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    color: white;
}
.scale-segment.inactive {
    filter: grayscale(60%);
    opacity: 0.7;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #555;
    padding: 0 5px;
}
.scale-labels span:nth-child(2) {
    text-align: center;
    flex: 1;
}
.scale-labels span:last-child {
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ped-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ped-title {
        font-size: 1.8rem;
    }

    .ped-subtitle {
        font-size: 1rem;
    }
    
    .result-summary {
        flex-direction: column;
        gap: 15px;
    }

    .scale-segment {
        font-size: 0.7rem;
    }
}
@media (max-width: 480px) {
    .ped-calculator-tool {
        padding: 20px 15px;
    }
    
    .ped-button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .ped-button {
        width: 100%;
    }
}

/* --- END OF FILE price-elasticity-of-demand-calculator.css --- */