/**
 * Calculator Styles
 */
.techkorm-zcm-calculator {
    max-width: 1000px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Preloader */
#techkorm-zcm-calculator .tk-zcm-preloader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
    z-index: 200;
    transition: opacity 0.3s ease-in-out;
}

#techkorm-zcm-calculator .tk-zcm-preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#techkorm-zcm-calculator .tk-zcm-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #b8d717;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: tk-spin 1s linear infinite;
}

#techkorm-zcm-calculator .tk-zcm-preloader-text {
    font-size: 1em;
    color: #666;
    font-weight: 500;
}

@keyframes tk-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#techkorm-zcm-calculator .tk-zcm-header h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* Input Section */
#techkorm-zcm-calculator .tk-zcm-input-section {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

#techkorm-zcm-calculator .tk-col {
    flex: 1;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

#techkorm-zcm-calculator .tk-col.tk-col-milk {
    background: #e8f0f5;
}

#techkorm-zcm-calculator .tk-col h3 {
    margin-bottom: 22px;
    font-size: 1.2em;
    color: #444;
    text-align: center;
    border-bottom: 2px solid #ddd;
    padding-bottom: 12px;
}

#techkorm-zcm-calculator .tk-form-group {
    margin-bottom: 15px;
}

#techkorm-zcm-calculator .tk-form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.95em;
}

/* Custom Tooltip */
#techkorm-zcm-calculator .tk-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: help;
}

#techkorm-zcm-calculator .tk-tooltip-icon {
    color: #888;
    font-size: 0.8em;
    display: inline-block;
}

#techkorm-zcm-calculator .tk-tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    margin-bottom: 5px;
}

#techkorm-zcm-calculator .tk-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #000;
}

#techkorm-zcm-calculator .tk-tooltip:hover .tk-tooltip-text {
    visibility: visible;
    opacity: 1;
}

#techkorm-zcm-calculator .tk-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

#techkorm-zcm-calculator .tk-input:focus {
    border-color: #b8d717;
    outline: none;
    box-shadow: 0 0 0 2px rgba(184, 215, 23, 0.1);
}

#techkorm-zcm-calculator .tk-field-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    line-height: 1.5;
}

/* Highlight effect for preset autofill */
@keyframes highlightPulse {
    0% {
        background-color: #fff;
    }
    50% {
        background-color: #fff3cd;
    }
    100% {
        background-color: #fff;
    }
}

#techkorm-zcm-calculator .tk-input.highlight {
    animation: highlightPulse 1s ease-in-out;
}

/* Presets */
#techkorm-zcm-calculator .tk-zcm-presets {
    margin-bottom: 20px;
}

#techkorm-zcm-calculator .tk-presets-buttons {
    display: flex;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#techkorm-zcm-calculator .tk-btn-preset {
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    transition: none;
    color: #fff;
    text-transform: uppercase;
    flex: 1;
    min-width: 100px;
    position: relative;
    line-height: 1.2;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 0.82em;
}

#techkorm-zcm-calculator .tk-btn-preset:after {
    content: '';
    display: none;
}

#techkorm-zcm-calculator .tk-preset-blue {
    background: #1e3a8a !important;
    box-shadow: none;
}

#techkorm-zcm-calculator .tk-preset-blue:hover,
#techkorm-zcm-calculator .tk-preset-blue.active {
    background: #1e40af !important;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.3);
}

#techkorm-zcm-calculator .tk-preset-red {
    background: #dc2626 !important;
    box-shadow: none;
}

#techkorm-zcm-calculator .tk-preset-red:hover,
#techkorm-zcm-calculator .tk-preset-red.active {
    background: #ef4444 !important;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.3);
}

#techkorm-zcm-calculator .tk-preset-green {
    background: #16a34a !important;
    box-shadow: none;
}

#techkorm-zcm-calculator .tk-preset-green:hover,
#techkorm-zcm-calculator .tk-preset-green.active {
    background: #22c55e !important;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.3);
}

#techkorm-zcm-calculator .tk-preset-orange {
    background: #ff8c00 !important;
    box-shadow: none;
}

#techkorm-zcm-calculator .tk-preset-orange:hover,
#techkorm-zcm-calculator .tk-preset-orange.active {
    background: #ff9a1e !important;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Results Section */
#techkorm-zcm-calculator .tk-zcm-results-section {
    margin-bottom: 30px;
}

#techkorm-zcm-calculator .tk-zcm-results-section h3 {
    text-align: center;
    margin-bottom: 20px;
}

#techkorm-zcm-calculator .tk-table-responsive {
    overflow-x: auto;
}

#techkorm-zcm-calculator .tk-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

#techkorm-zcm-calculator .tk-results-table th,
#techkorm-zcm-calculator .tk-results-table td {
    padding: 12px;
    border: 1px solid #eee;
    text-align: center;
}

#techkorm-zcm-calculator .tk-results-table th {
    background: #f4f4f4;
    font-weight: 600;
    color: #333;
}

#techkorm-zcm-calculator .tk-results-table tr:nth-child(even) {
    background: #fcfcfc;
}

#techkorm-zcm-calculator .tk-results-table td:first-child {
    text-align: left;
    font-weight: 500;
    width: 40%;
}

#techkorm-zcm-calculator .tk-total-row td {
    font-weight: bold;
    background: #e8f0f5;
    font-size: 1.1em;
}

/* Status Indicators */
#techkorm-zcm-calculator .tk-status {
    font-size: 0.85em;
    font-weight: bold;
    margin-top: 5px;
    text-transform: uppercase;
}

#techkorm-zcm-calculator .tk-status-norm {
    color: #4CAF50;
}

#techkorm-zcm-calculator .tk-status-deficiency,
#techkorm-zcm-calculator .tk-status-excess {
    color: #F44336;
}

/* Recommendation Section */
#techkorm-zcm-calculator .tk-zcm-recommendation {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #c8e6c9;
}

#techkorm-zcm-calculator .tk-zcm-recommendation h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2e7d32;
}

#techkorm-zcm-calculator .tk-rec-text {
    font-weight: bold;
    font-size: 1.1em;
    text-transform: lowercase;
    color: #1b5e20;
}

/* Footer */
#techkorm-zcm-calculator .tk-zcm-footer {
    text-align: center;
    font-size: 0.8em;
    color: #777;
    margin-top: 20px;
}

/* Spacer for visual alignment */
/* Height is set dynamically via JavaScript */
#techkorm-zcm-calculator .tk-spacer-desktop {
    min-height: 0;
}

/* Responsive */
@media (max-width: 991px) {
    #techkorm-zcm-calculator .tk-spacer-desktop {
        display: none;
    }

    #techkorm-zcm-calculator .tk-zcm-input-section {
        flex-direction: column;
    }

    #techkorm-zcm-calculator .tk-results-table {
        font-size: 0.85em;
    }

    #techkorm-zcm-calculator .tk-results-table td:first-child {
        width: auto;
    }
}
