/* Multi Apartment Calendar – Frontend */

.mac-calendar-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    color: #1a1a1a;
    line-height: 1.5;
}

/* Tabs */
.mac-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.mac-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    color: #374151;
}

.mac-tab:hover {
    border-color: var(--apt-color, #3b82f6);
    color: var(--apt-color, #3b82f6);
}

.mac-tab.active {
    background: var(--apt-color, #3b82f6);
    border-color: var(--apt-color, #3b82f6);
    color: #fff;
}

.mac-tab-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--apt-color, #3b82f6);
    flex-shrink: 0;
}

.mac-tab.active .mac-tab-dot {
    background: #fff;
}

/* Layout */
.mac-calendar-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 800px) {
    .mac-calendar-layout {
        grid-template-columns: 1fr;
    }
}

/* Calendar grid */
.mac-calendars {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.mac-month {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.mac-month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 15px;
}

.mac-month-nav {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
}

.mac-month-nav:hover {
    background: #e5e7eb;
    color: #111;
}

.mac-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    padding: 8px 4px 4px;
}

.mac-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 4px;
}

.mac-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background 0.1s;
    color: #111;
}

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

.mac-day.past {
    color: #d1d5db;
    cursor: default;
}

.mac-day.booked {
    background: #fee2e2;
    color: #991b1b;
    cursor: not-allowed;
    text-decoration: line-through;
}

.mac-day.available:hover {
    background: #eff6ff;
}

.mac-day.in-range {
    background: color-mix(in srgb, var(--apt-color, #3b82f6) 18%, white);
    border-radius: 0;
}

.mac-day.range-start,
.mac-day.range-end {
    background: var(--apt-color, #3b82f6);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
}

.mac-day.range-start {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.mac-day.range-end {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.mac-day.range-start.range-end {
    border-radius: 8px;
}

/* Booking panel */
.mac-booking-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 24px;
}

.mac-hint {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 16px;
}

.mac-dates {
    margin-bottom: 20px;
    font-size: 14px;
}

.mac-dates > div {
    margin-bottom: 6px;
}

.mac-form .mac-field {
    margin-bottom: 14px;
}

.mac-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #374151;
}

.mac-form input[type="text"],
.mac-form input[type="email"],
.mac-form input[type="tel"],
.mac-form input[type="number"],
.mac-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.mac-form input:focus,
.mac-form textarea:focus {
    outline: none;
    border-color: var(--apt-color, #3b82f6);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--apt-color, #3b82f6) 20%, transparent);
}

.mac-submit {
    width: 100%;
    padding: 12px 20px;
    background: var(--apt-color, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    margin-top: 8px;
}

.mac-submit:hover {
    opacity: 0.92;
}

.mac-submit:active {
    transform: scale(0.98);
}

.mac-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mac-form-message {
    margin-top: 14px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.mac-form-message.success {
    background: #d1fae5;
    color: #065f46;
}

.mac-form-message.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Legend */
.mac-legend {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    font-size: 12px;
    color: #6b7280;
}

.mac-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mac-legend i {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

/* Legal checkboxes */
.mac-legal {
    margin: 16px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mac-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    line-height: 1.4;
}

.mac-check input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--apt-color, #3b82f6);
}

.mac-check a {
    color: var(--apt-color, #3b82f6);
    text-decoration: underline;
}

.mac-check a:hover {
    text-decoration: none;
}

/* Honeypot – teljesen rejtett */
.mac-hp {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.mac-legal-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.mac-legal {
    margin: 16px 0 12px;
    padding: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
