﻿/* AGENT PORTAL - MOBILE PAGE-SPECIFIC FIXES */
/* Specific mobile optimizations for Agent portal pages */

/* ===== DASHBOARD PAGE MOBILE FIXES ===== */
@media (max-width: 768px) {
    /* Dashboard container mobile */
    .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Welcome card mobile */
    .welcome-card {
        margin-bottom: 1rem;
        padding: 1rem;
        min-height: 100px;
    }

    .welcome-title {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem;
    }

    .welcome-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .welcome-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .welcome-actions .btn {
        width: 100%;
        margin: 0;
    }

    /* Stats cards mobile - 2 per row */
    .row:has(.stat-card) .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 0.25rem;
        margin-bottom: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        min-height: 80px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-right: 0.75rem;
    }

    .stat-number {
        font-size: 1.3rem;
        margin-bottom: 0.125rem;
    }

    .stat-label {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    /* Quick actions mobile - 2 per row */
    .card-body .row:has(.btn) .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 0.25rem;
        margin-bottom: 0.5rem;
    }

    .card-body .btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        min-height: 80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .card-body .btn i {
        font-size: 1.2rem !important;
        margin-bottom: 0.375rem !important;
    }

    /* Card headers mobile */
    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-header h5 {
        font-size: 1rem;
        margin-bottom: 0;
    }

    .card-body {
        padding: 1rem;
    }

    /* Dashboard charts mobile */
    .chart-container {
        height: 200px !important;
        margin-bottom: 1rem;
    }

    /* Dashboard tables mobile */
    .dashboard-table {
        font-size: 0.8rem;
    }

    .dashboard-table th,
    .dashboard-table td {
        padding: 0.375rem 0.25rem;
    }

    /* Recent properties mobile */
    .property-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .property-item h6 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .property-item .text-muted {
        font-size: 0.75rem;
    }

    /* Tips section mobile */
    .tip-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .tip-content h6 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .tip-content p {
        font-size: 0.75rem;
        margin-bottom: 0;
    }
}

/* Ultra-small mobile devices */
@@media (max-width: 576px) {
    /* Stats cards - stack vertically on very small screens */
    .row:has(.stat-card) .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 0.125rem;
        margin-bottom: 0.375rem;
    }

    .stat-card {
        padding: 0.5rem;
        min-height: 70px;
    }

    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        margin-right: 0.5rem;
    }

    .stat-number {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* Quick actions - stack vertically on very small screens */
    .card-body .row:has(.btn) .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 0.125rem;
        margin-bottom: 0.375rem;
    }

    .card-body .btn {
        padding: 0.5rem;
        min-height: 60px;
        font-size: 0.75rem;
    }

    .card-body .btn i {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }

    .welcome-card {
        padding: 0.75rem;
        min-height: 80px;
    }

    .welcome-title {
        font-size: 1.2rem !important;
    }

    .welcome-subtitle {
        font-size: 0.8rem;
    }
}

/* ===== PROPERTY MANAGEMENT MOBILE FIXES ===== */
@media (max-width: 768px) {
    /* Property cards mobile layout */
    .property-card {
        margin-bottom: 1rem;
    }

    .property-image {
        height: 150px;
        object-fit: cover;
        border-radius: 8px 8px 0 0;
    }

    .property-details {
        padding: 0.75rem;
    }

    .property-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .property-price {
        font-size: 1.1rem;
        font-weight: 700;
        color: #00A6FF;
    }

    .property-location {
        font-size: 0.85rem;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }

    .property-features {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-bottom: 0.5rem;
    }

    .property-feature {
        background: #f8f9fa;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.75rem;
    }

    .property-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .property-actions .btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ===== BOOKING MANAGEMENT MOBILE FIXES ===== */
@media (max-width: 768px) {
    /* Booking cards mobile layout */
    .booking-card {
        margin-bottom: 1rem;
        border-left: 4px solid #00A6FF;
    }

    .booking-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.5rem;
    }

    .booking-id {
        font-size: 0.85rem;
        font-weight: 600;
        color: #00A6FF;
    }

    .booking-status {
        padding: 0.25rem 0.5rem;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .booking-status.confirmed {
        background: #d4edda;
        color: #155724;
    }

    .booking-status.pending {
        background: #fff3cd;
        color: #856404;
    }

    .booking-status.cancelled {
        background: #f8d7da;
        color: #721c24;
    }

    .booking-details {
        margin-bottom: 0.5rem;
    }

    .booking-guest {
        font-weight: 600;
        margin-bottom: 0.25rem;
    }

    .booking-dates {
        font-size: 0.85rem;
        color: #6c757d;
        margin-bottom: 0.25rem;
    }

    .booking-property {
        font-size: 0.85rem;
        color: #6c757d;
    }

    .booking-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .booking-actions .btn {
        flex: 1;
        min-width: 100px;
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
}

/* ===== REPORTS PAGE MOBILE FIXES ===== */
@media (max-width: 768px) {
    /* Report filters mobile */
    .report-filters {
        background: #f8f9fa;
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .report-filters .row > div {
        margin-bottom: 0.75rem;
    }

    .report-filters .btn {
        width: 100%;
    }

    /* Report cards mobile */
    .report-card {
        margin-bottom: 1rem;
        text-align: center;
    }

    .report-value {
        font-size: 1.5rem;
        font-weight: 700;
        color: #00A6FF;
        margin-bottom: 0.25rem;
    }

    .report-label {
        font-size: 0.85rem;
        color: #6c757d;
        margin-bottom: 0.25rem;
    }

    .report-change {
        font-size: 0.75rem;
        font-weight: 600;
    }

    .report-change.positive {
        color: #28a745;
    }

    .report-change.negative {
        color: #dc3545;
    }

    /* Report charts mobile */
    .report-chart {
        height: 200px !important;
        margin-bottom: 1rem;
    }

    /* Report tables mobile */
    .report-table {
        font-size: 0.8rem;
    }

    .report-table th,
    .report-table td {
        padding: 0.375rem 0.25rem;
        white-space: nowrap;
    }
}

/* ===== PROFILE PAGE MOBILE FIXES ===== */
@media (max-width: 768px) {
    /* Profile header mobile */
    .profile-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        margin: 0 auto 1rem;
        border-radius: 50%;
        background: #00A6FF;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.5rem;
        font-weight: 600;
    }

    .profile-name {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 0.25rem;
    }

    .profile-role {
        font-size: 0.9rem;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }

    .profile-stats {
        display: flex;
        justify-content: space-around;
        background: #f8f9fa;
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .profile-stat {
        text-align: center;
    }

    .profile-stat-value {
        font-size: 1.2rem;
        font-weight: 700;
        color: #00A6FF;
        margin-bottom: 0.25rem;
    }

    .profile-stat-label {
        font-size: 0.75rem;
        color: #6c757d;
    }

    /* Profile form mobile */
    .profile-form .form-group {
        margin-bottom: 1rem;
    }

    .profile-form .form-label {
        font-weight: 600;
        margin-bottom: 0.375rem;
    }

    .profile-form .form-control {
        border-radius: 8px;
    }

    .profile-form .btn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* ===== SETTINGS PAGE MOBILE FIXES ===== */
@media (max-width: 768px) {
    /* Settings sections mobile */
    .settings-section {
        margin-bottom: 1.5rem;
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 1rem;
    }

    .settings-section-title {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #e9ecef;
    }

    .settings-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f8f9fa;
    }

    .settings-item:last-child {
        border-bottom: none;
    }

    .settings-item-label {
        font-weight: 500;
        margin-bottom: 0.25rem;
    }

    .settings-item-description {
        font-size: 0.85rem;
        color: #6c757d;
    }

    .settings-item-control {
        flex-shrink: 0;
        margin-left: 1rem;
    }

    /* Settings form mobile */
    .settings-form .form-group {
        margin-bottom: 1rem;
    }

    .settings-form .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* ===== SEARCH AND FILTERS MOBILE FIXES ===== */
@media (max-width: 768px) {
    /* Search bar mobile */
    .search-container {
        margin-bottom: 1rem;
    }

    .search-input {
        border-radius: 25px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .search-button {
        border-radius: 25px;
        padding: 0.75rem 1.5rem;
    }

    /* Filters mobile */
    .filters-container {
        background: #f8f9fa;
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .filter-group {
        margin-bottom: 0.75rem;
    }

    .filter-label {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.375rem;
    }

    .filter-control {
        width: 100%;
    }

    .filters-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .filters-actions .btn {
        flex: 1;
    }

    /* Sort options mobile */
    .sort-container {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .sort-label {
        font-size: 0.85rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .sort-select {
        flex: 1;
    }
}

/* ===== PAGINATION MOBILE FIXES ===== */
@media (max-width: 768px) {
    .pagination {
        justify-content: center;
        margin: 1rem 0;
    }

    .pagination .page-item {
        margin: 0 0.125rem;
    }

    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
    }

    /* Hide page numbers on very small screens, keep only prev/next */
    @media (max-width: 576px) {
        .pagination .page-item:not(.page-item-prev):not(.page-item-next) {
            display: none;
        }

        .pagination .page-item.active {
            display: flex;
        }
    }
}

/* ===== LOADING STATES MOBILE FIXES ===== */
@media (max-width: 768px) {
    .loading-container {
        text-align: center;
        padding: 2rem 1rem;
    }

    .loading-spinner {
        width: 2rem;
        height: 2rem;
        margin-bottom: 1rem;
    }

    .loading-text {
        font-size: 0.9rem;
        color: #6c757d;
    }

    /* Skeleton loading mobile */
    .skeleton {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: loading 1.5s infinite;
        border-radius: 4px;
    }

    @keyframes loading {
        0% {
            background-position: 200% 0;
        }
        100% {
            background-position: -200% 0;
        }
    }

    .skeleton-text {
        height: 1rem;
        margin-bottom: 0.5rem;
    }

    .skeleton-title {
        height: 1.5rem;
        margin-bottom: 0.75rem;
        width: 60%;
    }

    .skeleton-card {
        height: 200px;
        margin-bottom: 1rem;
    }
}
