/* ================================================================
   WayToB Trip Budget Calculator — style.css v1.0.0
   ================================================================ */

/* ── Reset scoped to plugin ── */
.wbc-wrap *,
.wbc-wrap *::before,
.wbc-wrap *::after {
    box-sizing: border-box;
}

/* ── Wrapper ── */
.wbc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #1a1a2e;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    max-width: 720px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

/* ── Header ── */
.wbc-header {
    background: #0d1f3c;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.wbc-header-icon {
    font-size: 32px;
    line-height: 1;
}
.wbc-header h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1.2 !important;
}
.wbc-header p {
    font-size: 13px;
    color: #8fafc8;
    margin: 0;
}

/* ── Form ── */
.wbc-form {
    padding: 26px 28px 28px;
}
.wbc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.wbc-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wbc-field-full {
    margin-bottom: 20px;
}
.wbc-field-half {
    max-width: 50%;
    margin-bottom: 20px;
}
.wbc-label {
    font-size: 13px;
    font-weight: 600;
    color: #0d1f3c;
    display: flex;
    align-items: center;
    gap: 6px;
}
.wbc-label-icon {
    font-size: 16px;
    line-height: 1;
}

/* ── Select ── */
.wbc-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    color: #1a1a2e;
    background: #ffffff;
    cursor: pointer;
    appearance: auto;
    outline: none;
    transition: border-color 0.15s;
}
.wbc-select:focus {
    border-color: #239e8a;
}

/* ── Days / Travelers counter ── */
.wbc-days-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wbc-day-btn {
    width: 36px;
    height: 36px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #0d1f3c;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s;
    flex-shrink: 0;
    font-weight: 400;
    padding: 0;
}
.wbc-day-btn:hover {
    border-color: #239e8a;
    background: #e8f7f5;
}
.wbc-days-input {
    width: 56px;
    text-align: center;
    padding: 8px 4px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #0d1f3c;
    background: #ffffff;
    outline: none;
}
.wbc-days-input:focus {
    border-color: #239e8a;
}
/* Remove number arrows */
.wbc-days-input::-webkit-outer-spin-button,
.wbc-days-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.wbc-days-input[type=number] { -moz-appearance: textfield; }

.wbc-days-lbl {
    font-size: 13px;
    color: #6b7280;
}

/* ── Toggle ── */
.wbc-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}
.wbc-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.wbc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.wbc-toggle-slider {
    position: absolute;
    inset: 0;
    background: #e5e7eb;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.2s;
}
.wbc-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.wbc-toggle input:checked + .wbc-toggle-slider {
    background: #239e8a;
}
.wbc-toggle input:checked + .wbc-toggle-slider::before {
    transform: translateX(20px);
}
.wbc-toggle-text {
    font-size: 13px;
    color: #374151;
}

/* ── Travel style grid ── */
.wbc-style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.wbc-style-card {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}
.wbc-style-card:hover {
    border-color: #239e8a;
}
.wbc-style-card.wbc-style-active {
    border-color: #239e8a;
    background: #e8f7f5;
}
.wbc-style-icon {
    font-size: 24px;
    margin-bottom: 6px;
    line-height: 1;
}
.wbc-style-name {
    font-size: 13px;
    font-weight: 700;
    color: #0d1f3c;
    margin-bottom: 4px;
}
.wbc-style-desc {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

/* ── Validation errors ── */
.wbc-field-err {
    font-size: 12px;
    color: #dc2626;
    display: none;
    margin-top: 4px;
}
.wbc-field-err.wbc-show {
    display: block;
}

/* ── Calculate button ── */
.wbc-btn-wrap {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}
.wbc-calc-btn {
    background: #0d1f3c;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: background 0.15s, transform 0.1s;
}
.wbc-calc-btn:hover {
    background: #162d50;
}
.wbc-calc-btn:active {
    transform: scale(0.98);
}

/* ── Results ── */
.wbc-results {
    padding: 0 28px 28px;
    animation: wbc-fadeIn 0.3s ease;
}
@keyframes wbc-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wbc-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f3f4f6;
}
.wbc-results-title {
    font-size: 15px;
    font-weight: 700;
    color: #0d1f3c;
}
.wbc-recalc-btn {
    background: transparent;
    color: #239e8a;
    border: 1.5px solid #239e8a;
    border-radius: 7px;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.wbc-recalc-btn:hover {
    background: #239e8a;
    color: #ffffff;
}

/* ── Summary cards ── */
.wbc-summary-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 22px;
}
.wbc-summary-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.wbc-summary-card.wbc-summary-total {
    background: #0d1f3c;
    border-color: #0d1f3c;
}
.wbc-summary-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}
.wbc-summary-total .wbc-summary-label {
    color: #8fafc8;
}
.wbc-summary-value {
    font-size: 22px;
    font-weight: 800;
    color: #0d1f3c;
    margin-bottom: 4px;
    line-height: 1;
}
.wbc-summary-total .wbc-summary-value {
    color: #ffffff;
    font-size: 26px;
}
.wbc-val-teal {
    color: #239e8a !important;
}
.wbc-summary-sub {
    font-size: 11px;
    color: #9ca3af;
}
.wbc-summary-total .wbc-summary-sub {
    color: #8fafc8;
}

/* ── Breakdown ── */
.wbc-breakdown {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
}
.wbc-breakdown-title {
    font-size: 13px;
    font-weight: 700;
    color: #0d1f3c;
    margin-bottom: 14px;
}
.wbc-breakdown-row {
    margin-bottom: 12px;
}
.wbc-breakdown-row:last-child {
    margin-bottom: 0;
}
.wbc-breakdown-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.wbc-breakdown-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 7px;
}
.wbc-breakdown-label span {
    font-size: 15px;
    line-height: 1;
}
.wbc-breakdown-amount {
    font-size: 12px;
    font-weight: 700;
    color: #0d1f3c;
}
.wbc-bar-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}
.wbc-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* ── Tips ── */
.wbc-tips {
    background: #e8f7f5;
    border: 1px solid #239e8a44;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 14px;
}
.wbc-tips-title {
    font-size: 13px;
    font-weight: 700;
    color: #0d5c52;
    margin-bottom: 10px;
}
.wbc-tips ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wbc-tips ul li {
    font-size: 12px;
    color: #0d5c52;
    padding: 3px 0 3px 18px;
    position: relative;
    line-height: 1.5;
}
.wbc-tips ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #239e8a;
    font-weight: 700;
}

/* ── Disclaimer ── */
.wbc-disclaimer {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.6;
    text-align: center;
    padding: 0 4px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .wbc-form,
    .wbc-results { padding-left: 16px; padding-right: 16px; }
    .wbc-header  { padding: 18px 16px; }
    .wbc-row     { grid-template-columns: 1fr; gap: 16px; }
    .wbc-field-half { max-width: 100%; }
    .wbc-style-grid { grid-template-columns: 1fr 1fr; }
    .wbc-summary-grid { grid-template-columns: 1fr; }
    .wbc-summary-total { order: -1; }
}
@media (max-width: 380px) {
    .wbc-style-grid { grid-template-columns: 1fr; }
}
