/* MQS Booking Frontend Styles */

/* Grid System */
.mqs-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -15px;
}

.mqs-grid > div {
    padding: 15px;
}

.mqs-col-3 { width: 25%; }
.mqs-col-4 { width: 33.333%; }
.mqs-col-6 { width: 50%; }
.mqs-col-12 { width: 100%; }

/* Responsive */
@media (max-width: 768px) {
    .mqs-col-3,
    .mqs-col-4,
    .mqs-col-6 {
        width: 100%;
    }
}

/* Buttons */
.mqs-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.mqs-btn-primary {
    background-color: #0073aa;
    color: white;
}

.mqs-btn-primary:hover {
    background-color: #005a87;
    color: white;
    text-decoration: none;
}

.mqs-btn-secondary {
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

.mqs-btn-secondary:hover {
    background-color: #e1e1e1;
    color: #333;
    text-decoration: none;
}

/* Search Form */
.mqs-search-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mqs-search-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mqs-search-field {
    flex: 1;
    min-width: 150px;
}

.mqs-search-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.mqs-search-field input,
.mqs-search-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.mqs-search-field input:focus,
.mqs-search-field select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.mqs-search-submit {
    text-align: center;
}

/* Properties Grid */
.mqs-properties-grid {
    margin-top: 30px;
}

.mqs-property-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.mqs-property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.mqs-property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.mqs-property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mqs-property-card:hover .mqs-property-image img {
    transform: scale(1.05);
}

.mqs-featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.mqs-property-content {
    padding: 20px;
}

.mqs-property-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.mqs-property-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mqs-property-title a:hover {
    color: #0073aa;
}

.mqs-property-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.mqs-property-meta span {
    white-space: nowrap;
}

.mqs-property-description {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.5;
}

.mqs-property-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 20px;
}

.mqs-price-amount {
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
}

.mqs-price-period {
    font-size: 14px;
    color: #666;
}

/* Booking Form */
.mqs-booking-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.mqs-form-section {
    margin-bottom: 30px;
}

.mqs-form-section h3 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f1f1;
    color: #333;
}

.mqs-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mqs-form-field {
    flex: 1;
    min-width: 200px;
}

.mqs-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.mqs-form-field input,
.mqs-form-field select,
.mqs-form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.mqs-form-field input:focus,
.mqs-form-field select:focus,
.mqs-form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.mqs-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* Payment Methods */
.mqs-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mqs-payment-method {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #f1f1f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mqs-payment-method:hover {
    border-color: #0073aa;
    background-color: #f8f9fa;
}

.mqs-payment-method input[type="radio"] {
    margin-right: 10px;
    width: auto;
}

.mqs-payment-method input[type="radio"]:checked + span {
    font-weight: 600;
    color: #0073aa;
}

/* Pricing Breakdown */
.mqs-pricing-breakdown {
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.mqs-pricing-breakdown h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.mqs-pricing-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e1e1;
}

.mqs-pricing-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    font-weight: bold;
    font-size: 16px;
}

/* Property Details */
.mqs-property-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

@media (max-width: 968px) {
    .mqs-property-details {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.mqs-property-gallery {
    margin-bottom: 30px;
}

.mqs-main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.mqs-gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.mqs-gallery-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.mqs-gallery-thumbnails img:hover {
    opacity: 0.8;
}

.mqs-property-info h1 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #333;
}

.mqs-property-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: #666;
    flex-wrap: wrap;
}

.mqs-property-description {
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
}

/* Amenities */
.mqs-property-amenities {
    margin-bottom: 30px;
}

.mqs-property-amenities h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.mqs-amenities-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mqs-amenities-list li {
    padding: 8px 0;
    color: #666;
}

.mqs-amenities-list li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    margin-right: 8px;
}

/* Booking Widget */
.mqs-booking-widget {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 25px;
    position: sticky;
    top: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.mqs-pricing {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.mqs-price {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
}

.mqs-price-period {
    color: #666;
    margin-left: 5px;
}

/* Calendar */
.mqs-calendar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
}

.calendar-header h3 {
    margin: 0;
    color: #333;
}

.prev-month,
.next-month {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    color: #0073aa;
}

.prev-month:hover,
.next-month:hover {
    background: #e1e1e1;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-table th {
    padding: 15px 5px;
    text-align: center;
    background: #f8f9fa;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
}

.calendar-table td {
    padding: 0;
    text-align: center;
    border: 1px solid #f1f1f1;
    height: 60px;
    vertical-align: top;
}

.calendar-day {
    position: relative;
    height: 100%;
    padding: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.available {
    background-color: #d4edda;
}

.calendar-day.booked {
    background-color: #f8d7da;
    cursor: not-allowed;
}

.calendar-day.blocked {
    background-color: #e2e3e5;
    cursor: not-allowed;
}

.day-number {
    display: block;
    font-weight: 500;
}

.day-price {
    display: block;
    font-size: 11px;
    color: #0073aa;
    font-weight: bold;
}

/* Alerts and Messages */
.mqs-alert {
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.mqs-alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.mqs-alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.mqs-alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Loading Spinner */
.mqs-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mqs-search-row,
    .mqs-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .mqs-search-field,
    .mqs-form-field {
        min-width: auto;
    }
    
    .mqs-booking-form-container {
        padding: 20px;
        margin: 0 10px;
    }
    
    .mqs-property-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .mqs-amenities-list {
        grid-template-columns: 1fr;
    }
    
    .mqs-main-image img {
        height: 250px;
    }
    
    .calendar-table th,
    .calendar-table td {
        padding: 5px 2px;
        font-size: 12px;
    }
    
    .calendar-day {
        height: 40px;
        padding: 2px;
    }
}

/* Print Styles */
@media print {
    .mqs-btn,
    .mqs-booking-widget,
    .mqs-search-form {
        display: none;
    }
}