/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 *
 * @package    Salary_Hike_Calculator
 * @subpackage Salary_Hike_Calculator/public/css
 */

/* CSS Custom Properties (Variables) */
:root {
    /* Default values that will be overridden by dynamic settings */
    --shc-primary-color: #4CAF50;
    --shc-secondary-color: #2196F3;
    --shc-accent-color: #FF9800;
    --shc-button-bg-color: #4CAF50;
    --shc-button-text-color: #FFFFFF;
    --shc-button-hover-color: #45a049;
    --shc-input-border-radius: 4px;
    --shc-input-border-color: #dddddd;
    --shc-font-family: 'Inter', "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --shc-title-font-size: 24px;
    --shc-disclaimer-font-size: 14px;
    --shc-title-font-color: #333333;
    --shc-disclaimer-font-color: #666666;
    --shc-container-width: 800px; /* Renamed from --shc-header-width, this is for the main container */
    --shc-header-height: 150px;
    --shc-logo-size: 100px;
    --shc-header-bg-color: #f9f9f9;

    /* Tab Styling Defaults */
    --shc-tab-text-color: #666666;
    --shc-tab-hover-bg-color: #f0f0f0;
    --shc-tab-active-text-color: var(--shc-primary-color);
    --shc-tab-active-border-color: var(--shc-primary-color);
    --shc-tab-focus-outline-color: var(--shc-secondary-color);

    /* Calculator Body Alignment Defaults */
    --shc-calculator-body-margin-left: auto; 
    --shc-calculator-body-margin-right: auto;
    --shc-calculator-max-width: none; /* Default for calculator body max-width */
}

/* Container */
.salary-hike-calculator-container {
    font-family: var(--shc-font-family);
    max-width: var(--shc-container-width); /* Use the new variable for container max-width */
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Header */
.shc-header {
    display: flex;
    flex-wrap: wrap;
    width: 100%; /* Header should be 100% of its container */
    height: var(--shc-header-height);
    overflow: auto;
    margin: 0 auto 30px;
    padding: 15px;
    background-color: var(--shc-header-bg-color);
    border: 1px solid #eee;
    border-radius: var(--shc-input-border-radius);
}

/* Logo */
.shc-logo-container {
    flex: 0 0 auto;
    margin-right: 20px;
}

.shc-logo {
    max-width: var(--shc-logo-size);
    height: auto;
}

/* Logo Alignment Classes */
.shc-logo-h-left {
    text-align: left;
}

.shc-logo-h-center {
    text-align: center;
}

.shc-logo-h-right {
    text-align: right;
}

.shc-logo-v-top {
    align-self: flex-start;
}

.shc-logo-v-middle {
    align-self: center;
}

.shc-logo-v-bottom {
    align-self: flex-end;
}

/* Text Block */
.shc-text-block {
    flex: 1;
}

/* Text Alignment Classes */
.shc-text-h-left {
    text-align: left;
}

.shc-text-h-center {
    text-align: center;
}

.shc-text-h-right {
    text-align: right;
}

.shc-text-v-top {
    align-self: flex-start;
}

.shc-text-v-middle {
    align-self: center;
}

.shc-text-v-bottom {
    align-self: flex-end;
}

/* Title and Disclaimer */
.shc-title {
    margin: 0 0 10px 0;
    font-size: var(--shc-title-font-size);
    color: var(--shc-title-font-color);
}

.shc-disclaimer {
    margin: 0;
    font-size: var(--shc-disclaimer-font-size);
    color: var(--shc-disclaimer-font-color);
}

/* Calculator */
.shc-calculator {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--shc-input-border-radius);
    overflow: hidden;
    margin-left: var(--shc-calculator-body-margin-left);
    margin-right: var(--shc-calculator-body-margin-right);
    max-width: var(--shc-calculator-max-width); /* Apply the new max-width variable */
    /* If a specific width is desired for the calculator body itself for alignment to be more apparent, 
       a new --shc-calculator-body-width variable and setting would be needed. 
       For now, it will take the width of its container. */
}

/* Tabs */
.shc-tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #eee;
}

.shc-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-family: var(--shc-font-family);
    font-size: 16px;
    font-weight: 600;
    color: var(--shc-tab-text-color);
    transition: all 0.3s ease;
}

.shc-tab:hover {
    background-color: var(--shc-tab-hover-bg-color);
}

.shc-tab.active {
    color: var(--shc-tab-active-text-color);
    border-bottom-color: var(--shc-tab-active-border-color);
}

.shc-tab:focus {
    outline: 2px solid var(--shc-tab-focus-outline-color);
    outline-offset: -2px;
}

/* Tab Panels */
.shc-tab-panel {
    display: none;
    padding: 20px;
}

.shc-tab-panel.active {
    display: block;
}

/* Form */
.shc-form {
    margin-bottom: 20px;
}

.shc-form-row {
    margin-bottom: 15px;
}

.shc-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.shc-required {
    color: #e53935;
}

.shc-input-group {
    display: flex;
    align-items: center;
}

.shc-currency-symbol,
.shc-percent-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    height: 40px;
    background: #f5f5f5;
    border: 1px solid var(--shc-input-border-color);
    border-radius: var(--shc-input-border-radius) 0 0 var(--shc-input-border-radius);
    border-right: none;
}

.shc-percent-symbol {
    border-radius: 0 var(--shc-input-border-radius) var(--shc-input-border-radius) 0;
    border-left: none;
    border-right: 1px solid var(--shc-input-border-color);
}

.shc-input {
    flex: 1;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--shc-input-border-color);
    border-radius: 0;
    font-family: var(--shc-font-family);
    font-size: 16px;
}

.shc-input:focus {
    outline: none;
    border-color: var(--shc-secondary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.shc-input-group .shc-input {
    border-radius: 0 var(--shc-input-border-radius) var(--shc-input-border-radius) 0;
}

.shc-input-group .shc-input + .shc-percent-symbol + .shc-input {
    border-radius: 0;
}

/* Button */
.shc-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--shc-button-bg-color);
    color: var(--shc-button-text-color);
    border: none;
    border-radius: var(--shc-input-border-radius);
    font-family: var(--shc-font-family);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.shc-button:hover {
    background-color: var(--shc-button-hover-color);
}

.shc-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

/* Results */
.shc-result {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: var(--shc-input-border-radius);
    display: none;
    min-height: 100px;
}

.shc-result.active {
    display: block;
}

.shc-result-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: var(--shc-primary-color);
}

.shc-result-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--shc-secondary-color);
    margin-bottom: 15px;
}

.shc-result-steps {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.shc-result-steps-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.shc-result-steps-list {
    margin: 0;
    padding: 0 0 0 20px;
}

.shc-result-steps-list li {
    margin-bottom: 5px;
}

.shc-error {
    color: #e53935;
    margin-top: 10px;
    font-weight: 600;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .shc-header {
        flex-direction: column;
    }
    
    .shc-logo-container {
        margin-right: 0;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .shc-text-block {
        text-align: center;
    }
    
    .shc-tabs {
        flex-direction: column;
    }
    
    .shc-tab {
        border-bottom: 1px solid #eee; /* Consider making this border color dynamic too, or use tab-active-border-color with transparency for inactive */
    }
    
    .shc-tab.active {
        border-bottom: 1px solid #eee; /* For consistency, might need adjustment if left border is primary */
        border-left: 3px solid var(--shc-tab-active-border-color);
    }
}
