/* ── Birute Astro Calculator ───────────────────────────────────────────────── */

.ba-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
    background: #f0f0f0;
    border-radius: 8px;
    box-sizing: border-box;
}

/* ── Chart column (left) ── */
.ba-chart-col {
    flex: 1 1 0;
    min-width: 280px;
}

#ba-chart {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Form column (right) ── */
.ba-form-col {
    flex: 1 1 0;
    min-width: 300px;
}

/* ── Title ── */
.ba-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #444;
    margin: 0 0 20px;
}

/* ── Row / field ── */
.ba-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.ba-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 80px;
    min-width: 70px;
}

.ba-field-full {
    flex: 1 1 100%;
}

.ba-field label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.ba-field select,
.ba-field input[type="text"] {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 14px;
    background: #fff;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.ba-field select:focus,
.ba-field input[type="text"]:focus {
    border-color: #3a3ac8;
}

/* ── Location autocomplete ── */
.ba-location-wrap {
    position: relative;
}

.ba-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ba-autocomplete li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ba-autocomplete li:hover { background: #f5f5f5; }

/* ── Button ── */
.ba-btn {
    display: inline-block;
    background: #2c2ca8;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px 36px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.ba-btn:hover    { background: #1e1e8a; }
.ba-btn:disabled { background: #888; cursor: not-allowed; }

/* ── Status messages ── */
.ba-error {
    color: #c00;
    font-size: 13px;
    margin-top: 10px;
}

.ba-loading {
    color: #666;
    font-size: 13px;
    margin-top: 10px;
    font-style: italic;
}

/* ── Results table ── */
#ba-table-wrap { margin-top: 24px; }

.ba-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ba-table th {
    text-align: left;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    border-bottom: 2px solid #ddd;
}

.ba-table td {
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.ba-table td:first-child { color: #444; font-weight: 500; }
.ba-table td:last-child  { font-weight: 600; color: #c00; }

/* ── Responsive: stack on mobile ── */
@media (max-width: 700px) {
    .ba-wrap {
        flex-direction: column;
        gap: 24px;
        padding: 16px;
    }
    .ba-chart-col,
    .ba-form-col {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }
}
