/* Booking iCal Calendar - style v1.2.1 */

.bic-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 900px;
    margin: 1.5em 0;
}

/* Legenda */
.bic-legend {
    display: flex;
    gap: 1.5em;
    margin-bottom: 1.2em;
    flex-wrap: wrap;
    align-items: center;
}
.bic-legend-item {
    display: flex;
    align-items: center;
    gap: .45em;
    font-size: .88em;
    color: #444;
}
.bic-legend-hint {
    color: #888;
    font-style: italic;
    font-size: .92em;
}
.bic-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bic-dot--free     { background: #d4edda; border: 1px solid #82c996; }
.bic-dot--occupied { background: #f8d7da; border: 1px solid #e2909a; }
.bic-dot--today    { background: #cce5ff; border: 1px solid #7ab8f5; }

/* Siatka miesiecy */
.bic-calendars {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8em;
}
.bic-month {
    flex: 1 1 260px;
    min-width: 220px;
}
.bic-month-title {
    font-size: 1.05em;
    font-weight: 700;
    text-align: center;
    margin-bottom: .7em;
    color: #222;
    text-transform: capitalize;
}

/* Siatka 7 kolumn */
.bic-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

/* Komorki */
.bic-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 6px;
    font-size: .82em;
    cursor: default;
    user-select: none;
    transition: opacity .15s, transform .1s, box-shadow .1s;
}
.bic-cell--header {
    font-weight: 700;
    color: #555;
    background: transparent;
    font-size: .78em;
    aspect-ratio: auto;
    padding: 2px 0;
}
.bic-cell--empty { background: transparent; }
.bic-cell--day {
    border: 1px solid #e0e0e0;
    color: #333;
}
.bic-cell--free {
    background: #d4edda;
    border-color: #82c996;
    color: #155724;
}
.bic-cell--occupied {
    background: #f8d7da;
    border-color: #e2909a;
    color: #721c24;
    font-weight: 600;
}
.bic-cell--today {
    background: #cce5ff !important;
    border-color: #7ab8f5 !important;
    color: #004085 !important;
    font-weight: 700;
    box-shadow: 0 0 0 2px #7ab8f5;
}
.bic-cell--past { opacity: .45; }
.bic-cell--clickable { cursor: pointer; }
.bic-cell--clickable:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    z-index: 1;
    position: relative;
}

/* Zaznaczony zakres dat */
.bic-cell--selected {
    background: #0d6efd !important;
    border-color: #0a58ca !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 0 0 2px #0a58ca;
}
.bic-cell--in-range {
    background: #b6d4fe !important;
    border-color: #84b0fc !important;
    color: #0a3678 !important;
}

/* Przycisk CTA */
.bic-cta {
    margin-top: 1.4em;
}
.bic-open-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding: .75em 2em;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(13, 110, 253, .35);
    transition: background .2s, transform .15s, box-shadow .2s;
}
.bic-open-modal-btn::before {
    content: "\2709";
    font-size: 1.1em;
    line-height: 1;
}
.bic-open-modal-btn:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0848af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, .45);
}
.bic-open-modal-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 110, 253, .3);
}

/* Modal */
.bic-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(2px);
}
body.bic-modal-open { overflow: hidden; }
.bic-modal-inner {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 540px;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: bicSlideIn .2s ease;
}
@keyframes bicSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1);   }
}
.bic-modal-inner h2 { margin: 0 0 .35em; font-size: 1.3em; color: #111; }
.bic-modal-hint { font-size: .9em; color: #666; margin: 0 0 1.2em; }
.bic-modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none; border: none;
    font-size: 1.6rem; line-height: 1;
    color: #888; cursor: pointer;
    padding: 0 .25em;
    transition: color .1s;
}
.bic-modal-close:hover { color: #111; }

/* Formularz */
.bic-form-row { display: flex; gap: 1em; flex-wrap: wrap; }
.bic-form-row--2col > .bic-form-group { flex: 1 1 180px; }
.bic-form-group {
    display: flex;
    flex-direction: column;
    gap: .35em;
    margin-bottom: .9em;
    width: 100%;
}
.bic-form-group label { font-size: .88em; font-weight: 600; color: #333; }
.bic-req { color: #d63638; }
.bic-form-group input,
.bic-form-group textarea {
    width: 100%;
    padding: .5em .75em;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: .95em;
    font-family: inherit;
    color: #222;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.bic-form-group input:focus,
.bic-form-group textarea:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,.2);
}
.bic-form-group textarea { resize: vertical; min-height: 70px; }

/* Wynik */
.bic-result {
    padding: .65em .9em;
    border-radius: 6px;
    font-size: .9em;
    margin-bottom: .9em;
    display: none;
}
.bic-result:not(:empty) { display: block; }
.bic-result--success { background: #d1e7dd; color: #0a3622; border: 1px solid #a3cfbb; }
.bic-result--error   { background: #f8d7da; color: #58151c; border: 1px solid #f1aeb5; }

/* Przyciski formularza */
.bic-form-actions { display: flex; gap: .75em; flex-wrap: wrap; margin-top: .5em; }
.bic-submit-btn {
    flex: 1 1 140px;
    padding: .6em 1.2em;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .97em;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.bic-submit-btn:hover:not(:disabled) { background: #0b5ed7; }
.bic-submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.bic-cancel-btn {
    flex: 0 0 auto;
    padding: .6em 1.2em;
    background: transparent;
    color: #555;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: .97em;
    cursor: pointer;
    transition: background .15s;
}
.bic-cancel-btn:hover { background: #f5f5f5; }

/* Responsywnosc */
@media (max-width: 480px) {
    .bic-cell { font-size: .72em; border-radius: 4px; }
    .bic-modal-inner { padding: 1.3rem; }
    .bic-form-row--2col > .bic-form-group { flex: 1 1 100%; }
}
