/**
 * Spassia Rental System - Frontend Styles
 */

/* ============================================
   BOOKING FORM
   ============================================ */
.spr-booking-form {
    background: linear-gradient(135deg, #f8fff8 0%, #fff 100%);
    border: 2px solid #4ECDC4;
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
}

.spr-booking-form h3 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.3rem;
    color: #2D3436;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Date Picker Section */
.spr-date-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.spr-date-field {
    display: flex;
    flex-direction: column;
}

.spr-date-field label {
    font-weight: 600;
    color: #2D3436;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.spr-date-field input {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
    cursor: pointer;
}

.spr-date-field input:focus {
    outline: none;
    border-color: #4ECDC4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

.spr-date-field input::placeholder {
    color: #999;
}

/* Delivery Option */
.spr-delivery-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spr-delivery-option:hover {
    border-color: #4ECDC4;
}

.spr-delivery-option.active {
    border-color: #4ECDC4;
    background: linear-gradient(135deg, #e8faf9 0%, #fff 100%);
}

.spr-delivery-option input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #4ECDC4;
    cursor: pointer;
}

.spr-delivery-option .spr-delivery-label {
    flex: 1;
}

.spr-delivery-option .spr-delivery-label strong {
    display: block;
    color: #2D3436;
    margin-bottom: 2px;
}

.spr-delivery-option .spr-delivery-label span {
    font-size: 0.9rem;
    color: #666;
}

.spr-delivery-price {
    font-weight: 700;
    color: #4ECDC4;
    font-size: 1.1rem;
}

/* Price Summary */
.spr-price-summary {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.spr-price-summary.hidden {
    display: none;
}

.spr-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.spr-summary-row:last-child {
    border-bottom: none;
}

.spr-summary-row.spr-total {
    border-top: 2px solid #4ECDC4;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 1.2rem;
}

.spr-summary-label {
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spr-summary-value {
    font-weight: 600;
    color: #2D3436;
}

.spr-total .spr-summary-label {
    font-weight: 700;
    color: #2D3436;
}

.spr-total .spr-summary-value {
    font-size: 1.4rem;
    color: #FF6B6B;
}

/* Days Breakdown */
.spr-days-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.spr-day-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.spr-day-badge.weekday {
    background: #e3f2fd;
    color: #1565c0;
}

.spr-day-badge.weekend {
    background: #fff3e0;
    color: #e65100;
}

.spr-day-badge.total {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Loading State */
.spr-calculating {
    text-align: center;
    padding: 20px;
    color: #666;
}

.spr-calculating::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #4ECDC4;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spr-spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* Add to Cart Button */
.spr-add-to-cart-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 18px 30px !important;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%) !important;
    color: #fff !important;
    font-family: 'Baloo 2', sans-serif !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.4) !important;
    margin-bottom: 15px;
}

.spr-add-to-cart-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 35px rgba(255, 107, 107, 0.5) !important;
}

.spr-add-to-cart-btn:disabled {
    background: #ccc !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.spr-add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.spr-add-to-cart-btn.loading::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spr-spin 1s linear infinite;
    margin-left: 8px;
}

/* Success Message */
.spr-success-message {
    display: none;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #28a745;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 15px;
}

.spr-success-message.show {
    display: block;
    animation: spr-fadeIn 0.3s ease;
}

@keyframes spr-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.spr-success-message h4 {
    color: #155724;
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.spr-success-message p {
    color: #155724;
    margin: 0 0 15px;
}

.spr-success-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.spr-success-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.spr-btn-cart {
    background: #fff;
    color: #28a745;
    border: 2px solid #28a745;
}

.spr-btn-cart:hover {
    background: #28a745;
    color: #fff;
}

.spr-btn-checkout {
    background: #28a745;
    color: #fff;
}

.spr-btn-checkout:hover {
    background: #1e7e34;
}

/* Error State */
.spr-error-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    color: #856404;
    margin-bottom: 15px;
    display: none;
}

.spr-error-message.show {
    display: block;
}

/* WhatsApp & Phone Buttons */
.spr-contact-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.spr-whatsapp-btn,
.spr-phone-btn {
    flex: 1;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 20px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
}

.spr-whatsapp-btn {
    background: #25D366 !important;
    color: #fff !important;
}

.spr-whatsapp-btn:hover {
    background: #128C7E !important;
    color: #fff !important;
}

.spr-phone-btn {
    background: #fff !important;
    color: #2D3436 !important;
    border: 2px solid #2D3436 !important;
}

.spr-phone-btn:hover {
    background: #2D3436 !important;
    color: #fff !important;
}

/* Flatpickr Customization */
.flatpickr-calendar {
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    border: none !important;
}

.flatpickr-day.selected {
    background: #4ECDC4 !important;
    border-color: #4ECDC4 !important;
}

.flatpickr-day.selected:hover {
    background: #3dbdb5 !important;
}

.flatpickr-day.inRange {
    background: rgba(78, 205, 196, 0.2) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .spr-date-section {
        grid-template-columns: 1fr;
    }
    
    .spr-contact-buttons {
        flex-direction: column;
    }
    
    .spr-success-links {
        flex-direction: column;
    }
    
    .spr-success-links a {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   NEW BOOKING FORM STYLES
   ============================================ */

.spr-form-title {
    font-family: 'Baloo 2', -apple-system, sans-serif;
    font-size: 1.25rem;
    color: #2D3436;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #e0e0e0;
}

.spr-date-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.spr-field {
    display: flex;
    flex-direction: column;
}

.spr-field label {
    font-weight: 600;
    color: #2D3436;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.spr-datepicker {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234ECDC4' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 20px;
    cursor: pointer;
}

.spr-datepicker:focus {
    outline: none;
    border-color: #4ECDC4;
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.15);
}

.spr-datepicker::placeholder {
    color: #999;
}

/* Checkbox Delivery Option */
.spr-delivery-option {
    margin-bottom: 20px;
}

.spr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spr-checkbox-label:hover {
    border-color: #4ECDC4;
    background: #f8ffff;
}

.spr-checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #4ECDC4;
    cursor: pointer;
}

.spr-checkbox-label input[type="checkbox"]:checked + .spr-checkmark + .spr-delivery-text {
    color: #2D3436;
}

.spr-delivery-text {
    font-weight: 500;
    color: #666;
}

.spr-delivery-text .spr-delivery-price {
    color: #4ECDC4;
    font-weight: 700;
}

/* Price Calculation Box */
.spr-price-calculation {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.spr-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.95rem;
    color: #555;
}

.spr-calc-row:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.spr-calc-detail {
    font-size: 0.85rem;
    color: #888;
}

.spr-calc-total {
    border-top: 2px solid #4ECDC4 !important;
    margin-top: 10px;
    padding-top: 15px !important;
    font-size: 1.2rem !important;
    font-weight: 700;
    color: #2D3436 !important;
}

.spr-calc-total span:last-child {
    color: #FF6B6B;
    font-size: 1.4rem;
}

/* Submit Button */
.spr-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: #fff;
    font-family: 'Baloo 2', -apple-system, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.35);
}

.spr-submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(255, 107, 107, 0.45);
}

.spr-submit-btn:disabled {
    background: linear-gradient(135deg, #ccc 0%, #aaa 100%);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.spr-btn-icon {
    font-size: 1.3rem;
}

/* Form Messages */
.spr-form-message {
    display: none;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
    font-weight: 500;
    text-align: center;
}

.spr-form-message.success {
    display: block;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #28a745;
}

.spr-form-message.error {
    display: block;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #dc3545;
}

/* Checkout Options */
.spr-checkout-options {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.spr-option-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.spr-cart-btn {
    background: #fff;
    color: #4ECDC4;
    border: 2px solid #4ECDC4;
}

.spr-cart-btn:hover {
    background: #4ECDC4;
    color: #fff;
}

.spr-checkout-btn {
    background: #4ECDC4;
    color: #fff;
    border: 2px solid #4ECDC4;
}

.spr-checkout-btn:hover {
    background: #3dbdb5;
    border-color: #3dbdb5;
}

/* Responsive for new form */
@media (max-width: 600px) {
    .spr-date-fields {
        grid-template-columns: 1fr;
    }
    
    .spr-checkout-options {
        flex-direction: column;
    }
    
    .spr-submit-btn {
        padding: 16px 25px;
        font-size: 1rem;
    }
}

/* Cart Styles */
.spr-rental-badge {
    display: inline-block;
    background: #4ECDC4;
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.spr-price-from {
    color: #666;
    font-size: 0.9em;
}

.spr-price-period {
    color: #666;
    font-size: 0.85em;
}

/* ============================================
   FLATPICKR - DOLU GÜNLER KIRMIZI
   ============================================ */
.flatpickr-day.spr-booked-day,
.flatpickr-day.flatpickr-disabled.spr-booked-day {
    background: #ffebee !important;
    color: #c62828 !important;
    border-color: #ef9a9a !important;
    text-decoration: line-through;
    cursor: not-allowed !important;
}

.flatpickr-day.spr-booked-day::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #c62828;
    border-radius: 50%;
}

/* Flatpickr genel stiller */
.flatpickr-calendar {
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    border: none !important;
}

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

.flatpickr-day.inRange {
    background: rgba(255, 107, 107, 0.15) !important;
    border-color: transparent !important;
}

.flatpickr-day:hover:not(.flatpickr-disabled):not(.spr-booked-day) {
    background: rgba(255, 107, 107, 0.1) !important;
    border-color: #FF6B6B !important;
}

/* Checkout options */
.spr-checkout-options {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.spr-option-btn {
    flex: 1;
    padding: 14px 20px;
    text-align: center;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.spr-cart-btn {
    background: #f0f0f0;
    color: #333;
}

.spr-cart-btn:hover {
    background: #4ECDC4;
    color: #fff;
}

.spr-checkout-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
}

.spr-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}


/* ============================================
   EXTRAS / ZUSATZLEISTUNGEN
   ============================================ */
.spr-extras-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e0e0e0;
}

.spr-extras-title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1rem;
    color: #333;
    margin: 0 0 12px;
}

.spr-extra-option {
    margin-bottom: 10px;
}

.spr-extra-option .spr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.spr-extra-option .spr-checkbox-label:hover {
    background: #f0f8f0;
}

.spr-extra-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4ECDC4;
    flex-shrink: 0;
}
