/* 
 * BeyouRent - Property Rental Platform Styles
 * https://www.beyou4u.dev
 */

:root {
    --primary-color: #000080;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Property Cards */
.property-card {
    transition: var(--transition);
    border: none;
    box-shadow: var(--box-shadow);
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.property-image {
    height: 250px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.property-image-placeholder {
    height: 250px;
    background-color: var(--light-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.property-details {
    border-top: 1px solid #dee2e6;
    padding-top: 0.75rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #000066;
    border-color: #000055;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 128, 0.25);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Dashboard Styles */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
}

.dashboard-card.success {
    border-left-color: var(--success-color);
}

.dashboard-card.warning {
    border-left-color: var(--warning-color);
}

.dashboard-card.danger {
    border-left-color: var(--danger-color);
}

.dashboard-card.info {
    border-left-color: var(--info-color);
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.revenue {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.bookings {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card.properties {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-card.users {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: var(--transition);
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.photo-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Booking Calendar */
.booking-calendar {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.calendar-day {
    width: 40px;
    height: 40px;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    background-color: var(--light-color);
}

.calendar-day.booked {
    background-color: var(--danger-color);
    color: white;
    cursor: not-allowed;
}

.calendar-day.selected {
    background-color: var(--primary-color);
    color: white;
}

/* Amenities */
.amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.amenity-tag {
    background-color: var(--light-color);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
}

/* Reviews */
.review-card {
    border-left: 4px solid var(--warning-color);
    margin-bottom: 1rem;
}

.rating-stars {
    color: var(--warning-color);
}

/* Status Badges */
.status-pending {
    background-color: var(--warning-color) !important;
    color: var(--dark-color) !important;
}

.status-confirmed {
    background-color: var(--success-color) !important;
}

.status-cancelled {
    background-color: var(--danger-color) !important;
}

.status-completed {
    background-color: var(--info-color) !important;
}

.status-active {
    background-color: var(--success-color) !important;
}

.status-inactive {
    background-color: var(--secondary-color) !important;
}

.status-suspended {
    background-color: var(--danger-color) !important;
}

/* Admin Panel */
.admin-sidebar {
    background-color: #2c3e50;
    min-height: calc(100vh - 56px);
    color: white;
}

.admin-sidebar .nav-link {
    color: #bdc3c7;
    transition: var(--transition);
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Photo Upload */
.photo-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.photo-upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 0, 128, 0.05);
}

.photo-upload-area.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(0, 0, 128, 0.1);
}

/* Property Details */
.property-header {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.property-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.property-info-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}

/* Booking Form */
.booking-form {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 2rem;
}

.price-breakdown {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .property-image {
        height: 200px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .booking-form {
        position: static;
        margin-top: 2rem;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Table Styles */
.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table th {
    background-color: var(--light-color);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

/* Search Highlights */
.search-highlight {
    background-color: yellow;
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: white !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
