/* ============================================
   BaliEdge Booking — Public Styles
   ============================================ */

.baliedge-booking-widget {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Calendar */
.baliedge-calendar {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.baliedge-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.baliedge-calendar__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.baliedge-calendar__nav {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.baliedge-calendar__nav:hover {
    background: #f5f5f5;
}

.baliedge-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.baliedge-calendar__day-name {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    padding: 8px 0;
    text-transform: uppercase;
}

.baliedge-calendar__day {
    text-align: center;
    padding: 10px 4px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.baliedge-calendar__day:hover:not(.baliedge-day--unavailable):not(.baliedge-day--empty) {
    background: #e8f5e9;
}

.baliedge-day--empty {
    cursor: default;
}

.baliedge-day--today {
    font-weight: 700;
}

.baliedge-day--unavailable {
    color: #ccc;
    text-decoration: line-through;
    cursor: not-allowed;
    background: #fafafa;
}

.baliedge-day--selected {
    background: #2d5016 !important;
    color: #fff !important;
    font-weight: 600;
}

.baliedge-day--in-range {
    background: #e8f5e9;
    color: #2d5016;
}

.baliedge-day--check-in {
    border-radius: 8px 0 0 8px;
}

.baliedge-day--check-out {
    border-radius: 0 8px 8px 0;
}

.baliedge-day__price {
    display: block;
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

/* Legend */
.baliedge-calendar__legend {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.baliedge-legend__item {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.baliedge-legend__item::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.baliedge-legend--available::before {
    background: #fff;
    border: 1px solid #ddd;
}

.baliedge-legend--unavailable::before {
    background: #fafafa;
    border: 1px solid #eee;
}

.baliedge-legend--selected::before {
    background: #2d5016;
}

/* Price Summary */
.baliedge-price-summary {
    background: #f0f7ec;
    border: 1px solid #c8e6c9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.baliedge-price-summary__dates {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #2d5016;
    margin-bottom: 8px;
}

.baliedge-price-summary__details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.baliedge-price-summary__nights {
    color: #555;
    font-size: 14px;
}

.baliedge-price-summary__total {
    font-size: 24px;
    font-weight: 700;
    color: #2d5016;
}

/* Guest Form */
.baliedge-guest-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
}

.baliedge-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.baliedge-form-group {
    margin-bottom: 16px;
}

.baliedge-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.baliedge-form-group input,
.baliedge-form-group select,
.baliedge-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.baliedge-form-group input:focus,
.baliedge-form-group select:focus,
.baliedge-form-group textarea:focus {
    outline: none;
    border-color: #2d5016;
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.baliedge-submit-btn {
    width: 100%;
    padding: 14px;
    background: #2d5016;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.baliedge-submit-btn:hover {
    background: #1e3a0f;
}

.baliedge-submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.baliedge-form-error {
    background: #fdeaea;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Loading */
.baliedge-loading {
    text-align: center;
    padding: 40px;
}

.baliedge-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #2d5016;
    border-radius: 50%;
    animation: baliedge-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes baliedge-spin {
    to { transform: rotate(360deg); }
}

/* Error */
.baliedge-error {
    background: #fdeaea;
    color: #c62828;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
    .baliedge-form-row {
        grid-template-columns: 1fr;
    }

    .baliedge-calendar__day {
        padding: 8px 2px;
        font-size: 13px;
    }

    .baliedge-day__price {
        display: none;
    }
}

/* Admin styles */
.baliedge-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.baliedge-status--confirmed,
.baliedge-status--paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.baliedge-status--pending {
    background: #fff3e0;
    color: #e65100;
}

.baliedge-status--cancelled,
.baliedge-status--failed {
    background: #fdeaea;
    color: #c62828;
}

/* Confirmation & Cancelled Pages */
.baliedge-confirmation {
    max-width: 560px;
    margin: 40px auto;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.baliedge-confirmation__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 36px;
    line-height: 72px;
    margin: 0 auto 20px;
}

.baliedge-confirmation__icon--cancelled {
    background: #fdeaea;
    color: #c62828;
}

.baliedge-confirmation__icon--warning {
    background: #fff3e0;
    color: #e65100;
}

.baliedge-confirmation h2 {
    font-size: 28px;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.baliedge-confirmation__subtitle {
    font-size: 16px;
    color: #555;
    margin-bottom: 30px;
}

.baliedge-confirmation__details {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 4px 24px;
    text-align: left;
    margin-bottom: 24px;
}

.baliedge-confirmation__row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.baliedge-confirmation__row:last-child {
    border-bottom: none;
}

.baliedge-confirmation__total {
    font-size: 18px;
    font-weight: 700;
    color: #2d5016;
}

.baliedge-confirmation__label {
    color: #666;
}

.baliedge-confirmation__value {
    color: #1a1a1a;
    font-weight: 500;
}

.baliedge-confirmation__footer {
    font-size: 14px;
    color: #888;
}

.baliedge-confirmation__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.baliedge-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #2d5016;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s;
}

.baliedge-btn:hover {
    background: #1e3a0f;
    color: #fff;
}

.baliedge-btn--outline {
    background: transparent;
    color: #2d5016;
    border: 2px solid #2d5016;
}

.baliedge-btn--outline:hover {
    background: #2d5016;
    color: #fff;
}
