/* ============================================================
   business-day-calc / style.css
   Prefix: bd-
   ============================================================ */

.bd-container {
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- Section Cards --- */
.bd-section {
    background: #fdfdfd;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    border: 1px solid #eee;
    margin-bottom: 16px;
}

.bd-section-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0d6efd;
}

/* --- Mode tabs --- */
.bd-mode-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e8eaed;
    margin-bottom: 18px;
}

.bd-mode-tab {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    white-space: nowrap;
    user-select: none;
}

.bd-mode-tab:hover {
    color: #0d6efd;
}

.bd-mode-tab.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
}

/* --- Form fields --- */
.bd-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.bd-field-label {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    min-width: 80px;
    white-space: nowrap;
}

.bd-date-input {
    padding: 8px 12px;
    font-size: 14px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    color: #222;
    transition: border-color 0.2s;
}

.bd-date-input:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.bd-num-input {
    width: 80px;
    padding: 8px 12px;
    font-size: 15px;
    font-weight: 700;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    text-align: center;
    font-family: inherit;
    color: #222;
}

.bd-num-input:focus {
    border-color: #0d6efd;
    outline: none;
}

.bd-today-btn {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    background: #f0f4ff;
    border: 1px solid #c5d5f5;
    border-radius: 5px;
    cursor: pointer;
    color: #0d6efd;
    transition: background 0.15s;
    white-space: nowrap;
}

.bd-today-btn:hover {
    background: #dbe6ff;
}

.bd-field-unit {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

/* --- Exclude checkboxes --- */
.bd-exclude-group {
    padding: 14px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-top: 4px;
}

.bd-exclude-title {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bd-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 6px;
}

.bd-check-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    white-space: nowrap;
}

.bd-check-label input[type="checkbox"] {
    accent-color: #0d6efd;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.bd-custom-holidays-wrap {
    display: none;
    margin-top: 10px;
}

.bd-custom-holidays-wrap.open {
    display: block;
}

.bd-custom-textarea {
    width: 100%;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    padding: 8px 10px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    height: 70px;
    resize: vertical;
    color: #222;
    line-height: 1.5;
}

.bd-custom-textarea:focus {
    border-color: #0d6efd;
    outline: none;
}

/* --- Calculate button --- */
.bd-calc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 14px;
}

.bd-calc-btn:hover {
    background: #0b5ed7;
}

/* --- Result card --- */
.bd-result-section {
    display: none;
}

.bd-result-card {
    background: linear-gradient(135deg, #0d6efd 0%, #0056d2 100%);
    border-radius: 12px;
    padding: 24px;
    color: #fff;
}

.bd-result-date {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
}

.bd-result-sub {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.6;
}

.bd-result-holidays {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.6;
}

/* --- Calendar --- */
.bd-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bd-cal-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.bd-cal-nav {
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
    background: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: #555;
    transition: background 0.15s;
}

.bd-cal-nav:hover {
    background: #e0e0e0;
}

.bd-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.bd-cal-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    padding: 4px 0;
}

.bd-cal-dow.sun {
    color: #ea4335;
}

.bd-cal-dow.sat {
    color: #4285f4;
}

.bd-cal-cell {
    text-align: center;
    font-size: 13px;
    padding: 6px 2px;
    border-radius: 4px;
    position: relative;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bd-cal-cell.empty {
    background: transparent;
}

.bd-cal-cell.sun {
    color: #ea4335;
}

.bd-cal-cell.sat {
    color: #4285f4;
}

.bd-cal-cell.holiday {
    color: #ea4335;
    font-weight: 700;
}

.bd-cal-cell.off {
    background: #f5f5f5;
    color: #bbb;
}

.bd-cal-cell.range {
    background: #fff8e1;
}

.bd-cal-cell.start {
    background: #0d6efd;
    color: #fff !important;
    font-weight: 700;
    border-radius: 50%;
}

.bd-cal-cell.end {
    background: #f57c00;
    color: #fff !important;
    font-weight: 700;
    border-radius: 50%;
}

.bd-cal-cell.today {
    box-shadow: inset 0 0 0 2px #0d6efd;
}

.bd-cal-cell .bd-hol-dot {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ea4335;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .bd-mode-tab {
        padding: 8px 10px;
        font-size: 12px;
    }

    .bd-field-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .bd-field-label {
        min-width: auto;
    }

    .bd-result-date {
        font-size: 22px;
    }

    .bd-cal-cell {
        font-size: 12px;
        padding: 5px 1px;
    }
}