/* Owner Portal Container Styles */
.owner-portal-container {
    margin: 0 auto;
    max-width: 1200px;
    padding: 2rem 1rem;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    width: 100%;
}

/* Dashboard Tiles */
.dashboard-tile {
    width: 100%;
}


/* Login Container */
.owner-login-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: fit-content;
    margin: 2rem auto;
    max-width: 400px;
    padding: 2rem;
}

/* Calendar Specific Styles */
.calendar-tile {
    background: #fff;
}

.owner-calendar {
    height: 100%;
    width: 100%;
    margin-top: 1rem;
}

.owner-calendar .fc-multimonth-month {
    border-radius: var(--border-radius);
    border: 1px solid #e5e7eb;
    max-width: 32%; /* Default for desktop (3 columns) */
}

@media (max-width: 767px) { /* Mobile breakpoint (matches JS < 768px) */
    .owner-calendar .fc-multimonth-month {
        max-width: 100%; /* Allow full width for single column layout */
    }
}

/* Improve 12-month layout spacing */
.owner-calendar .fc-multimonth {
    gap: 20px;
}

.owner-calendar .fc-multimonth-month {
    margin-bottom: 1rem;
}

.fc .fc-multimonth {
    border:none;
    justify-content: space-between;
    gap: 15px;
}

/* Blocked date styling */
.owner-calendar .blocked-event {
    background-color: var(--primary-color) !important;
    opacity: 0.8;
}

/* Make text white on blocked dates for better visibility */
.owner-calendar .fc-daygrid-day:has(.blocked-event) .fc-daygrid-day-number {
    color: white !important;
}

.owner-calendar .arrival-date {
    background: linear-gradient(134deg, #ffffff 0%, #ffffff 50%, var(--primary-color) 53%, var(--primary-color) 100%) !important;
}

.owner-calendar .departure-date {
    background: linear-gradient(134deg, var(--primary-color) 0%, var(--primary-color) 50%, #ffffff 53%, #ffffff 100%) !important;
}

/* FullCalendar day cell styling for blocked dates */
.owner-calendar .fc-daygrid-day.blocked-event {
    background-color: var(--primary-color, #ef4444) !important;
    opacity: 0.8;
}

.owner-calendar .fc-daygrid-day.blocked-event .fc-daygrid-day-number {
    color: white !important;
    font-weight: bold;
}

.owner-calendar .fc-daygrid-day.arrival-date {
    background: linear-gradient(134deg, #ffffff 0%, #ffffff 50%, var(--primary-color, #ef4444) 53%, var(--primary-color, #ef4444) 100%) !important;
}

.owner-calendar .fc-daygrid-day.arrival-date .fc-daygrid-day-number {
    color: var(--primary-color, #ef4444) !important;
    font-weight: bold;
}

.owner-calendar .fc-daygrid-day.departure-date {
    background: linear-gradient(134deg, var(--primary-color, #ef4444) 0%, var(--primary-color, #ef4444) 50%, #ffffff 53%, #ffffff 100%) !important;
}

.owner-calendar .fc-daygrid-day.departure-date .fc-daygrid-day-number {
    color: var(--primary-color, #ef4444) !important;
    font-weight: bold;
}

.owner-calendar .fc-daygrid-day.fc-day-past {
    background-color: #e0e0e0;
}

.owner-calendar .fc-daygrid-day-frame {
    min-height: 35px;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 1rem;
}

.legend-item {
    align-items: center;
    display: flex;
    gap: 8px;
}

.legend-color {
    border-radius: 4px;
    height: 20px;
    width: 20px;
}

.legend-color.blocked {
    background-color: #ef4444;
    opacity: 0.8;
}

.legend-color.blocked-arrival {
    background: linear-gradient(134deg, #ffffff 0%, #ffffff 50%, #ef4444 53%, #ef4444 100%);
}

.legend-color.blocked-depart {
    background: linear-gradient(134deg, #ef4444 0%, #ef4444 50%, #ffffff 53%, #ffffff 100%);
}

.legend-text {
    color: #333;
    font-size: 14px;
}

/* Owner Checkout Specific Styles */
.owner-checkout {
    margin: 0 auto;
    max-width: 1200px;
    padding: 2rem 1rem;
}

.owner-checkout .checkout-container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
}

.owner-checkout .property-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.owner-checkout .property-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-direction: row;
}



.owner-checkout .property-image {
    flex: 0 0 250px;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    height: 150px;
    margin: 0px;
}

.owner-checkout .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.owner-checkout .property-title {
    flex: 1;
    flex-direction: column;
    gap: 0rem;
}

.owner-checkout .property-title h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--heading-color, #1a1a1a);
    font-weight: 600;
}

.owner-checkout .property-location {
    color: var(--text-color, #4a5568);
}


.owner-checkout .property-location iconify-icon {
    color: var(--text-muted, #6b7280);
}

.owner-checkout .property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color, #e5e7eb);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    margin: 1rem 0;
}

.owner-checkout .feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--feature-bg, #f8f9fa);
    border-radius: 0.375rem;
    color: var(--text-color, #4a5568);
    font-size: 0.875rem;
}

.owner-checkout .feature-item iconify-icon {
    color: var(--text-muted, #6b7280);
}

.owner-checkout .property-description {
    line-height: 1.6;
    color: var(--text-color, #4a5568);
    font-size: 0.875rem;
    padding-right: 1rem;
}

.owner-checkout .booking-section {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.owner-checkout .booking-section h2 {
    font-size: 1.25rem;
    margin: 0 0 1.5rem 0;
    color: var(--heading-color, #1a1a1a);
    font-weight: 600;
}


.owner-checkout .booking-notice {
    font-size: 0.875rem;
    color: var(--text-muted, #6b7280);
    margin: 1rem 0;
    line-height: 1.5;
}

/* Owner Checkout Responsive */
@media (max-width: 1024px) {
    .owner-checkout .checkout-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .owner-checkout .booking-form.collapsed {
        visibility: hidden;
    }
}

@media (max-width: 768px) {
    .owner-checkout {
        padding: 1rem;
    }

    .owner-checkout .booking-form {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
        background: white;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        margin: 0;
        padding: 0;
        border-radius: 20px 20px 0 0;
        transition: transform 0.3s ease-in-out;
        max-height: calc(100vh - 60px);
        overflow: hidden;
        transform: translateY(0);
    }

    .owner-checkout .booking-form.collapsed {
        transform: translateY(100%);
    }

    .owner-checkout .booking-form-content {
        padding: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 85px);
    }

    .owner-checkout .mobile-header {
        position: relative;
        min-height: 0px;
        height: 40px;
        padding: 20px 20px 0;
        background: white;
        border-radius: 20px 20px 0 0;
        cursor: pointer;
        z-index: 2;
        text-align: center;
    }

    .owner-checkout .handle-bar {
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background-color: #e0e0e0;
        border-radius: 2px;
    }

    .owner-checkout .mobile-header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
    }

    .owner-checkout .mobile-header-content h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--heading-color);
    }

    .owner-checkout.mobile-header-content span {
        color: var(--text-muted);
        font-size: 0.875rem;
    }

    .mobile-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    body.booking-form-expanded {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .owner-checkout .property-header {
        flex-direction: column;
    }

    .owner-checkout .property-image {
        width: 100%;
        height: 200px;
    }
    
    .owner-checkout .property-features {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .owner-checkout .feature-item {
        flex: 1 1 calc(50% - 0.5rem);
    }

    .owner-checkout .booking-section {
        padding: 1rem;
    }
}

/* Hide mobile elements on desktop */
@media (min-width: 769px) {
    .mobile-header,
    .mobile-backdrop,
    .handle-bar,
    .select-dates-button {
        display: none;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 500px;
    width: 90%;
    margin: 0 1rem;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.modal-header.success {
    background-color: var(--success-subtle, #f0fdf4);
    color: var(--success, #16a34a);
}

.modal-header.error {
    background-color: var(--error-subtle, #fef2f2);
    color: var(--error, #dc2626);
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.75;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: var(--text-color, #4a5568);
}

.modal-message.success {
    color: var(--success, #16a34a);
}

.modal-message p {
    margin: 0;
    line-height: 1.5;
}

.success-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.confirmation-number {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.confirmation-number span {
    font-size: 0.875rem;
    color: var(--text-muted, #6b7280);
}

.confirmation-number strong {
    font-size: 1.125rem;
    color: var(--heading-color, #1a1a1a);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    background-color: var(--background-subtle, #f8f9fa);
}

.modal-footer .rns-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal Transitions */
.modal-enter-active,
.modal-leave-active {
    transition: opacity 0.3s ease;
}

.modal-enter-from,
.modal-leave-to {
    opacity: 0;
}

.modal-container {
    transition: transform 0.3s ease;
}

.modal-enter-from .modal-container,
.modal-leave-to .modal-container {
    transform: scale(0.9);
}

/* Calendar Loading Spinner */
.calendar-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner-ring {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color, #e5e7eb);
    border-radius: 50%;
    border-top-color: var(--primary-color, #3b82f6);
    animation: spin 1s ease-in-out infinite;
}

.loading-text {
    color: var(--text-color, #4a5568);
    font-size: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

[v-cloak] {
    display: none;
}

/* Statement Page Styles */
/* Header actions layout */
.detail-headings {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.owner-header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .owner-statements .dashboard-tile {
        padding: 0px;
        width: 48%;
    }
    .owner-header-actions {
        flex-direction: row;
        gap: 1rem;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }
}

@media (max-width: 767px) {
    .detail-headings {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .owner-header-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .owner-header-actions .rns-btn {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}   

.statement-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Reservations Page Specific Styles */
.reservations-form .filter-tile {
    margin-bottom: 1.5rem;
}

.reservations-form .filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.reservations-form .form-group {
    margin-bottom: 0;
}

.reservations-form .property-selector {
    flex: 2 1 35%;
}

.reservations-form .date-picker-group {
    flex: 1 1 20%;
}

.reservations-form .filter-button-group {
    flex: 1 1 25%;
}

.reservations-form .filter-button-group .rns-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Enhanced Reservations Table Styles */
.reservations-table-tile .table-viewport {
    position: relative;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden; /* Fixed width viewport */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* Add subtle background gradient to indicate scrollable area */
    background: linear-gradient(90deg, rgba(248, 249, 250, 0.95) 0%, rgba(248, 249, 250, 0.8) 100%);
}

.reservations-table-tile .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: none;
}



.reservations-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 700px; /* Ensure minimum width for horizontal scroll */
}

.reservations-table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    padding: 12px 16px;
    font-weight: 600;
    color: #374151;
    text-align: left;
    font-size: 0.875rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.reservations-table thead th:first-child {
    border-left: none;
}

.reservations-table thead th:last-child {
    border-right: none;
}

.reservations-table tbody tr {
    background-color: #fff;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.reservations-table tbody tr:hover {
    background-color: #f9fafb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.reservations-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.reservations-table tbody tr:nth-child(even):hover {
    background-color: #f3f4f6;
}

.reservations-table tbody td {
    padding: 14px 16px;
    border-right: 1px solid #f3f4f6;
    color: #374151;
    font-size: 0.875rem;
    vertical-align: middle;
}

.reservations-table tbody td:first-child {
    border-left: none;
    font-weight: 500;
    color: #1f2937;
}

.reservations-table tbody td:last-child {
    border-right: none;
}

.reservations-table .total-row {
    background-color: #f3f4f6 !important;
    border-top: 2px solid #d1d5db;
    font-weight: 600;
}

.reservations-table .total-row:hover {
    background-color: #e5e7eb !important;
    transform: none;
}

.reservations-table .total-label {
    text-align: right;
    color: #374151;
    font-weight: 600;
}

.reservations-table .total-amount {
    color: #059669;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .reservations-table {
        min-width: 800px; /* Ensure horizontal scroll on mobile */
    }
    
    .reservations-table thead th,
    .reservations-table tbody td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .reservations-form .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reservations-form .property-selector,
    .reservations-form .date-picker-group,
    .reservations-form .filter-button-group {
        flex: 1 1 100%;
    }
    
    /* Add scroll hint on mobile - positioned relative to viewport */
    .reservations-table-tile .table-viewport::after {
        content: 'Swipe to scroll →';
        position: absolute;
        bottom: 10px;
        right: 10px;
        background-color: var(--primary-color);
        color: white;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
        z-index: 20;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        white-space: nowrap;
    }
    
    .reservations-table-tile.has-scroll .table-viewport::after {
        opacity: 1;
    }
    
    .reservations-table-tile.scrolling .table-viewport::after {
        opacity: 0;
    }
}

/* Styling for select with rns-btn-searchbar */
select.rns-form-control.rns-btn-searchbar {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.reservations-table-tile {
    margin-top: 1.5rem;
}

.no-data-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--background-subtle, #f8f9fa);
    border-radius: var(--border-radius);
    color: var(--text-muted, #6b7280);
    font-size: 1rem;
    gap: 0.5rem;
}

/* Ensure tile styles are applied if not already global */
.dashboard-tile {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width:100%;
}

.tile-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tile-body {
    flex: 1;
}

/* Select Dates Button */
.select-dates-button {
    position: fixed;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px !important;
}

.select-dates-button:active {
    transform: translateX(-50%) scale(0.98);
}

.select-dates-button iconify-icon {
    margin-right: 4px;
}
