/* ============================================
   Tamsan Dişli - Shared Table & Grid Styles
   ============================================ */

/* --- Grid Layouts --- */
.dh-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dh-grid-inputs {
    margin-bottom: 20px;
    overflow-x: auto;
}

.dh-grid-helis {
    margin-bottom: 20px;
    max-width: 650px;
}

.sv-grid-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.vida-grid-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.krem-grid-top,
.krem-grid-mid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media(max-width: 992px) {

    .sv-grid-3col,
    .vida-grid-3col {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px) {

    .dh-grid-2col,
    .krem-grid-top,
    .krem-grid-mid {
        grid-template-columns: 1fr;
    }
}

/* --- Table Core --- */
.yd-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
}

.yd-table th,
.yd-table td {
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 14px;
    font-size: 0.88rem;
    line-height: 1.5;
    vertical-align: middle;
}

.yd-table th {
    color: rgba(88, 166, 255, 0.9);
    font-weight: 500;
    background: rgba(0, 0, 0, 0.2);
    text-align: left;
    letter-spacing: 0.01em;
}

.yd-table td {
    background: rgba(255, 255, 255, 0.015);
}

.yd-table thead th {
    text-align: center;
    background: rgba(88, 166, 255, 0.1);
    color: var(--brand-color, #58a6ff);
    font-weight: 600;
    padding: 12px 14px;
    font-size: 0.9rem;
}

.yd-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.yd-table td.sym {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    width: 55px;
    font-size: 0.82rem;
}

/* --- Inputs --- */
.yd-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.88rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.yd-input:focus {
    outline: none;
    border-color: var(--brand-color, #58a6ff);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.12);
}

.yd-input[readonly] {
    background: rgba(88, 166, 255, 0.08);
    border-color: rgba(88, 166, 255, 0.2);
    cursor: default;
}

select.yd-input option,
select.flex-input option,
select.form-control option {
    background: #1e293b;
    /* Dark background for dropdown options */
    color: #fff;
}

/* --- Output Values --- */
.yd-output {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.yd-unit {
    color: var(--brand-color, #58a6ff);
    font-weight: 600;
    font-size: 0.82rem;
    text-align: center;
    width: 45px;
    opacity: 0.8;
}

/* --- Section Titles --- */
.yd-section-title {
    border-bottom: 2px solid rgba(88, 166, 255, 0.2);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--brand-color, #58a6ff);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* --- Reference Tables (DIN 8187, TS 1980 etc.) --- */
.ref-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: var(--text-color, #c9d1d9);
}

.ref-table th,
.ref-table td {
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 12px;
    text-align: center;
    line-height: 1.4;
}

.ref-table thead th {
    background: rgba(88, 166, 255, 0.12);
    color: var(--brand-color, #58a6ff);
    font-weight: 600;
    padding: 10px 12px;
    font-size: 0.84rem;
}

.ref-table tbody td {
    background: rgba(0, 0, 0, 0.15);
}

.ref-table tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.22);
}

.ref-table tbody tr:hover td {
    background: rgba(88, 166, 255, 0.05);
}

/* --- Kama Tabs --- */
.kama-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.kama-tab {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #8b949e);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-weight: 500;
}

.kama-tab:hover {
    background: rgba(88, 166, 255, 0.08);
    color: #fff;
}

.kama-tab.active {
    background: rgba(88, 166, 255, 0.15);
    color: var(--brand-color, #58a6ff);
    border-color: var(--brand-color, #58a6ff);
}

.kama-tab-content {
    display: none;
}

.kama-tab-content.active {
    display: block;
}

/* --- Calculator Image Block --- */
.calc-image-block {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px;
    background: rgba(255, 255, 255, 0.015);
}

/* --- Responsive table scroll --- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}