/* =========================================================
   OVERTIME CALCULATOR
   Independent Theme System
========================================================= */

:root {
    --ot-primary: #007bff;
    --ot-primary-hover: #0069d9;

    --ot-background: #f5f7fb;
    --ot-surface: #ffffff;
    --ot-surface-secondary: #f8fafc;

    --ot-text: #333333;
    --ot-heading: #222222;
    --ot-muted: #666666;

    --ot-border: #e5e5e5;
    --ot-border-light: #eeeeee;
    --ot-input-border: #cccccc;

    --ot-focus: rgba(0, 123, 255, 0.12);

    --ot-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);

    --ot-on-primary: #ffffff;
}


/* =========================================================
   DARK THEME
========================================================= */

body.ot-dark {
    --ot-primary: #3b82f6;
    --ot-primary-hover: #2563eb;

    --ot-background: #111827;
    --ot-surface: #1f2937;
    --ot-surface-secondary: #263244;

    --ot-text: #f3f4f6;
    --ot-heading: #ffffff;
    --ot-muted: #9ca3af;

    --ot-border: #374151;
    --ot-border-light: #374151;
    --ot-input-border: #4b5563;

    --ot-focus: rgba(59, 130, 246, 0.18);

    --ot-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);

    --ot-on-primary: #ffffff;
}


/* =========================================================
   PAGE
========================================================= */

body {
    background: var(--ot-background);
    color: var(--ot-text);
}


/* =========================================================
   OVERTIME CALCULATOR
========================================================= */

.ot-container {
    width: 100%;
    max-width: 850px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}


/* =========================================================
   HEADING
========================================================= */

.ot-container h1.ot.calculator {
    text-align: center;
    font-size: 2.2rem;
    margin: 0 0 10px;
}


/* =========================================================
   SUBTITLE
========================================================= */

.ot-container .subtitle {
    text-align: center;
    font-size: 1rem;
    margin: 0 auto 30px;
    line-height: 1.5;
}


/* =========================================================
   OVERTIME TITLE SECTION
========================================================= */

.ot-container > h1.ot.calculator,
.ot-container > .subtitle {
    background: var(--ot-primary);
    color: var(--ot-on-primary);
    box-sizing: border-box;
}

.ot-container > h1.ot.calculator {
    width: 100%;
    margin: 0;
    padding: 20px 20px 8px;
    border-radius: 8px 8px 0 0;
    font-size: 2.2rem;
    text-align: center;
}

.ot-container > .subtitle {
    width: 100%;
    margin: 0 0 30px;
    padding: 8px 20px 20px;
    border-radius: 0 0 8px 8px;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}


/* =========================================================
   CARDS
========================================================= */

.ot-container .card {
    background: var(--ot-surface);
    border: 1px solid var(--ot-border);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--ot-shadow);
    box-sizing: border-box;
}

.ot-container .card h2 {
    margin: 0 0 20px;
    font-size: 1.3rem;
    color: var(--ot-heading);
    border-bottom: 1px solid var(--ot-border-light);
    padding-bottom: 12px;
}


/* =========================================================
   INPUT GROUPS
========================================================= */

.ot-container .input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.ot-container .input-group:last-child {
    margin-bottom: 0;
}

.ot-container .input-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ot-text);
}

.ot-container .input-group input,
.ot-container .input-group select {
    width: 100%;
    height: 45px;
    padding: 0 12px;
    border: 1px solid var(--ot-input-border);
    border-radius: 7px;
    font-size: 1rem;
    background: var(--ot-surface);
    color: var(--ot-text);
    box-sizing: border-box;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}


/* =========================================================
   INPUT FOCUS
========================================================= */

.ot-container .input-group input:focus,
.ot-container .input-group select:focus {
    border-color: var(--ot-primary);
    box-shadow: 0 0 0 3px var(--ot-focus);
}


/* =========================================================
   OVERTIME INPUTS
========================================================= */

.ot-container .ot-inputs {
    display: flex;
    gap: 20px;
}

.ot-container .ot-inputs .input-group {
    width: 100%;
}


/* =========================================================
   CALCULATE BUTTON
========================================================= */

.ot-container #calculateBtn {
    display: block;
    width: fit-content;
    max-width: none;
    height: 48px;
    margin: 22px auto;
    padding: 0 20px;
    border: none;
    border-radius: 7px;
    background: var(--ot-primary);
    color: var(--ot-on-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
    transition:
        background 0.2s,
        transform 0.1s;
}

.ot-container #calculateBtn:hover {
    background: var(--ot-primary-hover);
}

.ot-container #calculateBtn:active {
    transform: scale(0.99);
}


/* =========================================================
   RESULT
========================================================= */

.ot-container .result-card {
    background: var(--ot-surface-secondary);
}

.ot-container .result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--ot-border);
}

.ot-container .result-row span {
    color: var(--ot-muted);
    font-size: 0.95rem;
}

.ot-container .result-row strong {
    color: var(--ot-heading);
    font-size: 1rem;
    text-align: right;
}

.ot-container .result-row.total {
    border-bottom: none;
    margin-top: 5px;
    padding-top: 18px;
}

.ot-container .result-row.total span,
.ot-container .result-row.total strong {
    font-size: 1.15rem;
    font-weight: 700;
}


/* =========================================================
   SUMMARY
========================================================= */

#summary {
    width: 100%;
    max-width: 850px;
    margin: 20px auto;
    padding: 18px 25px;
    background: var(--ot-surface);
    color: var(--ot-text);
    border: 1px solid var(--ot-border);
    border-radius: 8px;
    box-shadow: var(--ot-shadow);
    text-align: center;
    font-size: 1rem;
    box-sizing: border-box;
}

#summary h2 {
    width: 100%;
    margin: 0 0 15px;
    padding-bottom: 10px;
    font-size: 1.3rem;
    color: var(--ot-heading);
    border-bottom: 1px solid var(--ot-border-light);
}

#summary p {
    margin: 10px 0;
    color: var(--ot-text);
    line-height: 1.4;
}

#total,
#totalOverTime {
    color: var(--ot-heading);
    font-weight: 700;
    font-size: 1.1rem;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    background: var(--ot-primary);
    color: var(--ot-on-primary);
    text-align: center;
    box-sizing: border-box;
}

footer a {
    color: var(--ot-on-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 0.8;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .ot-container {
        margin: 25px auto;
        padding: 0 15px;
    }

    .ot-container h1.ot.calculator {
        font-size: 1.8rem;
    }

    .ot-container .subtitle {
        font-size: 0.9rem;
        margin-bottom: 22px;
    }

    .ot-container .card {
        padding: 18px;
        border-radius: 10px;
    }

    .ot-container .card h2 {
        font-size: 1.15rem;
    }

    .ot-container .ot-inputs {
        display: block;
    }

    .ot-container .result-row {
        padding: 12px 0;
    }

    .ot-container .result-row span {
        font-size: 0.9rem;
    }

    .ot-container .result-row strong {
        font-size: 0.95rem;
    }

    #summary {
        width: calc(100% - 20px);
        max-width: 850px;
        margin: 20px auto;
        padding: 18px;
    }

    #summary h2 {
        margin-bottom: 12px;
        padding-bottom: 9px;
    }

    #summary p {
        margin: 8px 0;
    }
}


/* =========================================================
   VERY SMALL SCREENS
========================================================= */

@media (max-width: 380px) {

    .ot-container {
        padding: 0 10px;
    }

    .ot-container .card {
        padding: 15px;
    }

    .ot-container h1.ot.calculator {
        font-size: 1.6rem;
    }

    .ot-container .result-row {
        gap: 10px;
    }

    .ot-container .result-row span {
        font-size: 0.85rem;
    }

    .ot-container .result-row strong {
        font-size: 0.9rem;
    }

    #summary {
        width: calc(100% - 20px);
        max-width: 850px;
        padding: 15px;
    }

    #summary h2 {
        font-size: 1.2rem;
    }

    #summary p {
        font-size: 0.95rem;
        margin: 7px 0;
    }
}

#themeToggle {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 1px solid var(--ot-border);
    border-radius: 50%;

    background: var(--ot-surface);
    color: var(--ot-text);

    cursor: pointer;
    font-size: 16px;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

#themeToggle:hover {
    background: var(--ot-surface-secondary);
}

#themeToggle:active {
    transform: scale(0.94);
}

#themeToggle i {
    pointer-events: none;
}
#themeToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;
    margin-left: 8px;
    padding: 0;

    border: 1px solid var(--ot-border);
    border-radius: 50%;

    background: var(--ot-surface);
    color: var(--ot-text);

    cursor: pointer;
    vertical-align: middle;
}

#themeToggle i {
    font-size: 15px;
}








