/**
 * Soil & fertilizer calculator — matches planting calendar tool visuals (gd-pcal-*).
 */

[x-cloak] {
    display: none !important;
}

/* Align with article column (col-lg-8); prevent flex/grid children from overflowing horizontally. */
.gd-sfc-column {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.gd-sfc-root {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.gd-sfc-root .gd-pcal-card {
    max-width: 100%;
    box-sizing: border-box;
}

.gd-sfc-fert-mode-row {
    max-width: none;
}

.gd-sfc-fert-npk-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gd-sfc-fert-npk-cell {
    flex: 1;
    min-width: 0;
}

.gd-sfc-root .gd-pcal-grid-2 {
    min-width: 0;
}

/* Tabs */
.gd-sfc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 1.25rem;
    border-bottom: 2px solid #0a0a0a;
    max-width: 100%;
    box-sizing: border-box;
}

.gd-sfc-tab {
    flex: 1 1 auto;
    min-width: 0;
    border: 2px solid #0a0a0a;
    border-bottom: none;
    margin-bottom: -2px;
    background: #fff;
    padding: 0.65rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0a0a0a;
    cursor: pointer;
    text-align: center;
}

.gd-sfc-tab + .gd-sfc-tab {
    margin-left: -2px;
}

.gd-sfc-tab:hover {
    background: #fefce8;
}

.gd-sfc-tab--active {
    background: #fcd34d;
    z-index: 1;
}

.gd-sfc-tab:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Shape picker (pot / bed) */
.gd-sfc-shape-row {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 480px) {
    .gd-sfc-shape-row {
        grid-template-columns: 1fr 1fr;
    }
}

.gd-sfc-shape-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid #0a0a0a;
    border-radius: 0;
    background: #fff;
    padding: 1rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0a0a0a;
    text-align: center;
}

.gd-sfc-shape-btn:hover {
    background: #fefce8;
}

.gd-sfc-shape-btn--active {
    background: #fef3c7;
    box-shadow: inset 0 0 0 2px #0a0a0a;
}

.gd-sfc-shape-btn:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

.gd-sfc-shape-icon {
    width: 88px;
    height: 72px;
    flex-shrink: 0;
    color: #0a0a0a;
}

.gd-sfc-shape-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Reference table */
.gd-sfc-ref {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e5e5;
}

.gd-sfc-ref-title {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0a0a0a;
}

.gd-sfc-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gd-sfc-table {
    width: 100%;
    min-width: 280px;
    border-collapse: collapse;
    font-size: 0.875rem;
    color: #0a0a0a;
}

.gd-sfc-table th,
.gd-sfc-table td {
    border: 2px solid #0a0a0a;
    padding: 0.65rem 0.75rem;
    text-align: left;
}

.gd-sfc-table th {
    background: #fef3c7;
    font-weight: 600;
}

.gd-sfc-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.gd-sfc-note {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: #525252;
}
