/* Sally's Phone Rental Plugin Styles */

.spr-rental-section {
    margin: 30px 0;
    padding: 25px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.spr-rental-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2em;
    color: #333;
}

.spr-datepicker-wrapper {
    margin-bottom: 20px;
}

.spr-datepicker-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.spr-datepicker {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.spr-datepicker:hover,
.spr-datepicker:focus {
    border-color: #666;
    outline: none;
}

.spr-rental-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.spr-availability-status {
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 600;
}

.spr-loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.spr-available {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.spr-unavailable {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.spr-price-calculation {
    padding: 15px;
    background: #fff;
    border: 2px solid #28a745;
    border-radius: 4px;
}

.spr-price-calculation > div {
    margin-bottom: 8px;
}

.spr-price-calculation > div:last-child {
    margin-bottom: 0;
}

.spr-days,
.spr-calculated-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spr-price-amount {
    font-size: 1.3em;
    color: #28a745;
}

.spr-price-breakdown {
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    color: #666;
}

/* Flatpickr Custom Styling */
.flatpickr-calendar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #28a745 !important;
    border-color: #28a745 !important;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: #218838 !important;
    border-color: #218838 !important;
}

.flatpickr-day.inRange {
    background: #d4edda !important;
    border-color: #d4edda !important;
    box-shadow: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .spr-rental-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .spr-datepicker {
        max-width: 100%;
    }
    
    .spr-days,
    .spr-calculated-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* WordPress Admin Styles */
#spr_rental_options .options_group {
    padding: 12px;
}

/* Loading Animation */
.spr-loading::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid #856404;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spr-spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spr-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Cart & Checkout Styles */
.woocommerce-cart-form__cart-item .spr-rental-data,
.woocommerce-checkout-review-order-table .spr-rental-data {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* Order Details */
.woocommerce-order-details .spr-rental-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 0;
}

.woocommerce-order-details .spr-rental-meta strong {
    color: #333;
}
