/* Accommodation Booking Manager - Public Styles */

/* General Wrapper */
.abm-booking-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Calendar Styles */
.abm-calendar-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.abm-calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.abm-calendar-prev,
.abm-calendar-next {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.abm-calendar-prev:hover,
.abm-calendar-next:hover {
    background: #005a87;
}

.abm-calendar-current-month {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* Calendar Grid */
.abm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.abm-month {
    background: #f9f9f9;
    border-radius: 5px;
    padding: 15px;
}

.abm-month-header h3 {
    margin: 0 0 15px 0;
    text-align: center;
    color: #0073aa;
    font-size: 18px;
}

.abm-calendar-table {
    width: 100%;
}

.abm-calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
}

.abm-day-name {
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    color: #666;
    padding: 8px 0;
    background: #e9ecef;
    border-radius: 3px;
}

.abm-calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.abm-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent;
}

.abm-day:not(.empty):not(.past):not(.booked):not(.blocked):hover {
    background: #e3f2fd;
    transform: scale(1.05);
}

.abm-day.empty {
    cursor: default;
    background: transparent;
}

.abm-day.past {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
}

.abm-day.available {
    background: #c8e6c9;
    color: #2e7d32;
    font-weight: bold;
}

.abm-day.booked {
    background: #ffcdd2;
    color: #c62828;
    cursor: not-allowed;
}

.abm-day.blocked {
    background: #e0e0e0;
    color: #616161;
    cursor: not-allowed;
}

.abm-day.selected {
    background: #0073aa;
    color: white;
    font-weight: bold;
    border: 2px solid #005a87;
}

.abm-day.today {
    border: 2px solid #ff9800;
}

.day-number {
    font-size: 14px;
}

/* Calendar Legend */
.abm-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.legend-color.available {
    background: #c8e6c9;
}

.legend-color.booked {
    background: #ffcdd2;
}

.legend-color.blocked {
    background: #e0e0e0;
}

.legend-color.selected {
    background: #0073aa;
}

.legend-text {
    font-size: 14px;
    color: #666;
}

/* Booking Form */
.abm-booking-form-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.abm-booking-form h3,
.abm-booking-form h4 {
    color: #333;
    margin-bottom: 20px;
}

.abm-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.abm-form-group {
    flex: 1;
}

.abm-form-group.half {
    flex: 0 0 calc(50% - 10px);
}

.abm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.abm-form-group input,
.abm-form-group select,
.abm-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.abm-form-group input:focus,
.abm-form-group select:focus,
.abm-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

/* Booking Summary */
.abm-booking-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #0073aa;
}

.abm-booking-summary h4 {
    margin-top: 0;
    color: #0073aa;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-total {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #0073aa;
    font-size: 18px;
}

/* Customer Details */
.abm-customer-details {
    margin-top: 30px;
}

/* Buttons */
.abm-button {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.abm-button-primary {
    background: #0073aa;
    color: white;
}

.abm-button-primary:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.abm-button-success {
    background: #4caf50;
    color: white;
}

.abm-button-success:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.abm-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.abm-form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* Messages */
.abm-messages,
.abm-payment-messages {
    margin-top: 20px;
}

.abm-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.abm-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.abm-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.abm-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Payment Section */
.abm-payment-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.abm-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.abm-payment-method {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.abm-payment-method:hover {
    border-color: #0073aa;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.abm-payment-method img {
    max-height: 40px;
}

/* Stripe Elements */
#card-element {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 20px 0;
}

/* Loading State */
.abm-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.abm-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    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 */
@media (max-width: 768px) {
    .abm-calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .abm-form-row {
        flex-direction: column;
    }
    
    .abm-form-group.half {
        flex: 1;
    }
    
    .abm-calendar-navigation {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .abm-payment-methods {
        grid-template-columns: 1fr;
    }
}