@charset "utf-8";

/* Calculator Common - Timepoint Theme Style */
.calc_wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: hsl(0 0% 100%);
    border: 1px solid hsl(214.3 31.8% 91.4%);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Header Area */
.calc_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calc_title_wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calc_icon {
    color: hsl(221.2 83.2% 45%);
}

.calc_title_text {
    font-size: 1.5rem;
    font-weight: 800;
    color: hsl(222.2 47.4% 11.2%);
    margin: 0;
}

.calc_header_actions {
    display: flex;
    gap: 0.5rem;
}

.calc_header_btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background-color: white;
    border: 1px solid hsl(214.3 31.8% 91.4%);
    border-radius: 6px;
    color: hsl(215.4 16.3% 46.9%);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.calc_header_btn:hover {
    background-color: hsl(210 40% 98%);
    color: hsl(222.2 47.4% 11.2%);
    border-color: hsl(215.4 16.3% 46.9%);
}

.calc_section {
    margin-bottom: 1.5rem;
}

.calc_label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(222.2 47.4% 11.2%);
    margin-bottom: 0.5rem;
}

/* Segmented Control (Radio Buttons) */
.calc_radio_group {
    display: flex;
    gap: 0.5rem;
    background-color: hsl(210 40% 96.1%);
    padding: 0.25rem;
    border-radius: 0.5rem;
}

.calc_radio_group input[type="radio"] {
    display: none;
}

.calc_radio_group label {
    flex: 1;
    text-align: center;
    padding: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(215.4 16.3% 46.9%);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.calc_radio_group input[type="radio"]:checked+label {
    background-color: hsl(0 0% 100%);
    color: hsl(221.2 83.2% 45%);
    font-weight: 700;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

/* Input Group */
.calc_input_group {
    position: relative;
    display: flex;
    align-items: center;
}

.calc_input_group input,
.calc_input_group select {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border: 1px solid hsl(214.3 31.8% 91.4%);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: hsl(0 0% 100%);
}

.calc_input_group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.calc_input_group input:focus,
.calc_input_group select:focus {
    outline: none;
    border-color: hsl(221.2 83.2% 53.3%);
    box-shadow: 0 0 0 2px hsl(221.2 83.2% 53.3% / 0.2);
}

.calc_input_unit {
    position: absolute;
    right: 1rem;
    font-size: 0.875rem;
    color: hsl(215.4 16.3% 46.9%);
    pointer-events: none;
}

/* Helper Text */
.calc_helper {
    font-size: 0.75rem;
    color: hsl(215.4 16.3% 46.9%);
    margin-top: 0.25rem;
}

/* Help Icon and Tooltip */
.calc_help_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 0.35rem;
    background: linear-gradient(135deg, hsl(214 15% 55%), hsl(214 15% 65%));
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    font-family: serif;
    cursor: help;
    transition: all 0.2s;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border: 2px solid white;
    outline: 1px solid hsl(214 15% 55%);
}

.calc_help_icon:hover {
    background: linear-gradient(135deg, hsl(214 15% 45%), hsl(214 15% 55%));
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.calc_help_icon:active {
    transform: scale(1.05);
}

/* Tooltip Modal */
.calc_tooltip_modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.calc_tooltip_modal.active {
    display: flex;
}

.calc_tooltip_content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
    z-index: 10000;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.calc_tooltip_title {
    font-size: 1.2rem;
    font-weight: 700;
    color: hsl(222.2 47.4% 11.2%);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid hsl(210 40% 90%);
}

.calc_tooltip_text {
    color: hsl(215.4 16.3% 46.9%);
    line-height: 1.7;
    font-size: 0.95rem;
}

.calc_tooltip_text ul {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.calc_tooltip_text li {
    margin-bottom: 0.5rem;
}

.calc_tooltip_close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: hsl(210 40% 95%);
    border: none;
    font-size: 1.75rem;
    color: hsl(215.4 16.3% 46.9%);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.calc_tooltip_close:hover {
    background-color: hsl(0 80% 50%);
    color: white;
    transform: rotate(90deg);
}

/* Calculate Button */
.calc_submit_btn {
    width: 100%;
    padding: 1rem;
    background-color: hsl(221.2 83.2% 45%);
    color: hsl(0 0% 100%);
    border: none;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.calc_submit_btn:hover {
    background-color: hsl(221.2 83.2% 35%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Result Area */
.calc_result {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: hsl(210 40% 98%);
    border: 1px solid hsl(214.3 31.8% 91.4%);
    border-radius: 0.75rem;
    display: none;
}

.calc_result_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid hsl(214.3 31.8% 91.4%);
}

.calc_result_table th {
    background-color: hsl(210 40% 96.1%);
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: hsl(222.2 47.4% 11.2%);
    border-bottom: 1px solid hsl(214.3 31.8% 91.4%);
    font-size: 0.875rem;
}

.calc_result_table td {
    padding: 0.75rem;
    border-bottom: 1px solid hsl(214.3 31.8% 91.4%);
    font-size: 0.875rem;
    color: hsl(222.2 47.4% 11.2%);
}

.calc_result_table tr:last-child td {
    border-bottom: none;
}

/* Checkbox */
.calc_checkbox {
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
    margin-right: 0.5rem;
    accent-color: hsl(221.2 83.2% 45%);
}

/* Export Buttons */
.calc_export_btns {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn_export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background-color: white;
    border: 1px solid hsl(214.3 31.8% 91.4%);
    border-radius: 6px;
    color: hsl(215.4 16.3% 46.9%);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn_export:hover {
    background-color: hsl(210 40% 98%);
    color: hsl(222.2 47.4% 11.2%);
    border-color: hsl(215.4 16.3% 46.9%);
}

/* Disclaimer */
.calc_disclaimer {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: hsl(45 100% 96%);
    border: 1px solid hsl(45 90% 85%);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: hsl(35 80% 30%);
    line-height: 1.4;
}

/* Banner Area */
.calc_banner {
    background-color: hsl(210 40% 98%);
    border: 2px dashed hsl(214.3 31.8% 91.4%);
    border-radius: 16px;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(215.4 16.3% 46.9%);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Glossary Tabs */
.calc_info_tabs {
    margin-bottom: 30px;
    border-bottom: 1px solid hsl(214.3 31.8% 91.4%);
    padding-bottom: 2rem;
}

.calc_tab_header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.calc_tab_btn {
    padding: 0.5rem 1rem;
    background-color: hsl(210 40% 96.1%);
    border: none;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(215.4 16.3% 46.9%);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.calc_tab_btn:hover {
    background-color: hsl(214.3 31.8% 91.4%);
    color: hsl(222.2 47.4% 11.2%);
}

.calc_tab_btn.active {
    background-color: hsl(221.2 83.2% 45%);
    color: white;
    font-weight: 600;
}

.calc_tab_content {
    display: none;
    padding: 1.5rem;
    background-color: hsl(210 40% 98%);
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: hsl(222.2 47.4% 11.2%);
}

.calc_tab_content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.calc_tab_title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: hsl(221.2 83.2% 45%);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 991px) {
    .calc_wrap {
        padding: 1.5rem;
    }

    .calc_result_table th,
    .calc_result_table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .calc_export_btns {
        flex-direction: column;
    }

    .btn_export {
        justify-content: center;
        width: 100%;
    }

    .calc_banner {
        display: none;
        min-height: 200px;
        margin-top: 2rem;
    }
}

/* Desktop Split Layout */
@media (min-width: 992px) {
    .calc_wrap {
        max-width: 1100px;
    }

    .calc_body {
        display: flex;
        align-items: flex-start;
        gap: 40px;
    }

    .calc_form {
        flex: 1;
        min-width: 0;
    }

    .calc_right_panel {
        flex: 1;
        min-width: 0;
        position: sticky;
        top: 20px;
    }

    .calc_result {
        margin-top: 0;
    }
}