/* Path: tomashorsky.com/_calc_/shared/calc_global.css */
/* --- HLAVNÍ KONTEJNER KALKULAČKY --- */
.th-calc-wrapper {
    box-sizing: border-box;
    padding: 25px;
    margin-bottom: 30px;
    background: rgba(30, 30, 30, 0.6);
    border: 1px dashed rgba(100, 100, 100, 0.5);
    border-radius: 15px;
    color: #d6d6d6;
    font-family: 'Open Sans', sans-serif;
    max-width: 100%;
}

.th-calc-wrapper h3 {
    font-family: 'Conv_texgyreadventor-regular', sans-serif;
    color: #f9c343;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 6px;
}

.th-calc-wrapper label {
    display: block;
    margin-bottom: 1px;
    font-size: 13px;
    letter-spacing: 0px;
    font-weight: bold;
    color: rgba(255, 255, 255, 1);
}

/* NOVÉ: Třída pro jednotky, která zruší CapsLock */
.th-unit {
    text-transform: none;
    /* Ignoruje nadřazené uppercase */
    opacity: 0.7;
    /* Lehce zprůhlední, vypadá to lépe */
}

/* --- LAYOUT A GRID --- */
.drawer-inputs {
    display: block !important;
    width: 100% !important;
    float: none !important;
}

.th-basic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    width: 100% !important;
}

.th-expert-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100% !important;
}

@media (max-width: 600px) {

    .th-basic-grid,
    .th-expert-grid {
        grid-template-columns: 1fr !important;
    }

    .th-radio-group {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- 1. TLAČÍTKO VÝPOČTU (Oranžové) --- */
.th-calc-btn {
    display: block;
    /* Změna z inline-block na block pro centrování */
    width: fit-content;
    /* Aby nebylo přes celou šířku */
    margin: 20px auto;
    /* Auto zajistí vycentrování */
    padding: 20px 40px;
    background: linear-gradient(135deg, #f9c343 0%, #e59040 100%);
    color: #ffffff !important;
    /* Vynucená černá barva */
    border: 0;
    border-radius: 55px;
    font-size: 19px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s;
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.6);
    clear: both;
}

.th-calc-btn:hover {
    box-shadow: 0 0 15px 0 #f9c343;
    transform: translateY(-1px);
}

/* --- INPUTY A OVLÁDÁNÍ --- */
.th-input-group {
    position: relative;
    width: 100%;
    display: block;
}

.th-input-group input[type="number"] {
    width: 100%;
    height: 50px;
    box-sizing: border-box;
    background: rgba(65, 65, 65, 0.9) !important;
    color: white !important;
    border: 1px solid transparent;
    border-radius: 25px;
    padding: 10px 15px;
    padding-right: 45px;
    font-size: 16px;
    font-family: 'Conv_texgyreadventor-regular', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    /* Inputy taky na střed, vypadá to lépe k vycentrovanému labelu */
}

.th-input-group input[type="number"]:focus {
    border-color: #f9c343;
    box-shadow: 0 0 8px rgba(249, 195, 67, 0.2);
}

.th-input-group input::-webkit-outer-spin-button,
.th-input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.th-input-group input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.th-spinners {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 10;
    align-items: center;
}

.th-spin-btn {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border-radius: 50%;
    background: #f9c343;
    color: #000000;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.th-spin-btn:hover {
    transform: scale(1.15);
    background: #ffcc4d;
}

.th-spin-btn:active {
    transform: scale(0.9);
}

/* --- TOOLTIPY A LABELY (ZDE JE ZMĚNA ZAROVNÁNÍ) --- */
.th-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    justify-content: center;
    /* TOTO ZAROVNÁ LABEL NA STŘED */
    line-height: 1.1;
}

.th-help-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16px;
    height: 16px;
    background-color: transparent;
    border: 1px solid #f9c343;
    color: #f9c343;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    position: relative;
    transition: all 0.2s;
}

.th-help-icon:hover {
    background-color: #f9c343;
    color: black;
}

.th-tooltip-text {
    visibility: hidden;
    width: 240px;
    background-color: #222;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    font-weight: normal;
    text-transform: none;
    line-height: 1.5;
    border: 1px solid #f9c343;
    box-shadow: 0 10px 100px 10px rgba(0, 0, 0, 0.95);
    position: absolute;
    z-index: 1000;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.th-help-icon:hover .th-tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* --- EXPERTNÍ NASTAVENÍ --- */
.th-expert-toggle {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed #f9c343;
    color: #f9c343;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 30px;
    margin-bottom: 20px;
    transition: all 0.3s;
    clear: both !important;
}

.th-expert-toggle:hover {
    background: rgba(249, 195, 67, 0.1);
}

.th-expert-content {
    display: none;
    width: 100% !important;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    clear: both;
    animation: slideDown 0.3s ease-out;
}

.th-radio-group {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
}

.th-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.th-radio-label input {
    margin-right: 10px;
    accent-color: #f9c343;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- VÝSLEDKY --- */
.drawer-result {
    display: none;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    clear: both;
}

.drawer-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .drawer-result-grid {
        grid-template-columns: 1fr;
    }
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.result-card.highlight {
    background: rgba(249, 195, 67, 0.05);
    border-color: rgba(249, 195, 67, 0.2);
}

.card-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    margin-bottom: 8px;
}

.card-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
    line-height: 1.2;
}

.card-value small {
    font-size: 0.5em;
    color: #777;
    font-weight: normal;
    vertical-align: middle;
}

.card-sub {
    font-size: 11px;
    color: #f9c343;
    margin-top: 6px;
}

.card-sub.neutral {
    color: #777;
}

.drilling-list {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
}

.drill-row {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drill-row:last-child {
    border-bottom: none;
}

/* =======================================================
   CALCWOOD PRO - ČISTÉ TŘÍDY PRO AKTIVNÍ LICENCI
   ======================================================= */
.th-pro-active-box {
    text-align: center;
    margin-bottom: 60px;
    background: rgba(20, 20, 20, 0.8);
    border-top: 4px solid #f9c343;
    padding: 40px;
    border-radius: 12px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.th-pro-crown-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 85px;
    /* Zvětšeno o cca 20 % */
    height: 85px;
    background: #f9c343;
    /* Žlutý kruh */
    border-radius: 50%;
    margin-bottom: 20px;
}

.th-pro-crown-icon {
    width: 45px;
    /* Zvětšeno o cca 20 % */
    height: 45px;
    background-color: #141414;
    /* Černá korunka (inverzní) */
    -webkit-mask: url('/shared/img/icon_crown_solid.svg') no-repeat center / contain;
    mask: url('/shared/img/icon_crown_solid.svg') no-repeat center / contain;
}

.th-pro-active-box h2 {
    color: #fff;
    margin-top: 0;
    font-size: 32px;
    margin-bottom: 15px;
}

.th-pro-active-box h2 span {
    color: #f9c343;
}

.th-pro-active-box p {
    color: #bbb;
    font-size: 18px;
    margin-bottom: 0;
    line-height: 1.6;
}