/* Public Styles for Vacation Rental Sync Pro */

:root {
    --vrs-primary-color: #4CAF50;
    --vrs-secondary-color: #2196F3;
    --vrs-danger-color: #F44336;
    --vrs-warning-color: #FF9800;
    --vrs-success-color: #4CAF50;
    --vrs-text-color: #333;
    --vrs-border-color: #ddd;
    --vrs-background-color: #f9f9f9;
}

/* Calendar Styles */
.vrs-calendar-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: var(--vrs-font-family, inherit);
}

.vrs-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--vrs-background-color);
    border-radius: 8px;
}

.vrs-calendar-nav button {
    background: var(--vrs-primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.vrs-calendar-nav button:hover {
    background: #45a049;
}

.vrs-calendar-nav button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.vrs-calendar-current {
    font-size: 18px;
    font-weight: 600;
    color: var(--vrs-text-color);
}

.vrs-calendar-months {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.vrs-calendar-month {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.vrs-month-header {
    background: var(--vrs-primary-color);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.vrs-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.vrs-day-header {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    background: var(--vrs-background-color);
    font-size: 14px;
    color: #666;
}

.vrs-calendar-day {
    aspect-ratio: 1;
    padding: 8px;
    border: 1px solid var(--vrs-border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.vrs-calendar-day.other-month {
    color: #ccc;
    background: #fafafa;
}

.vrs-calendar-day.available {
    background: var(--vrs-calendar-available, #e8f5e9);
}

.vrs-calendar-day.available:hover {
    background: #c8e6c9;
    transform: scale(1.05);
}

.vrs-calendar-day.booked {
    background: var(--vrs-calendar-booked, #ffebee) !important;
    color: #c62828 !important;
    cursor: not-allowed !important;
}

/* Aumentar especificidad para evitar conflictos */
.vrs-calendar-wrapper .vrs-calendar-day.booked {
    background: var(--vrs-calendar-booked, #ffebee) !important;
    color: #c62828 !important;
    cursor: not-allowed !important;
}

.vrs-calendar .vrs-calendar-day.booked {
    background: var(--vrs-calendar-booked, #ffebee) !important;
    color: #c62828 !important;
    cursor: not-allowed !important;
}

.vrs-calendar-day.pending {
    background: var(--vrs-calendar-pending, #fff3e0);
    color: #e65100;
}

.vrs-calendar-day.selected {
    background: var(--vrs-secondary-color);
    color: white;
}

.vrs-calendar-day.in-range {
    background: #e3f2fd;
}

.vrs-day-number {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.vrs-day-price {
    font-size: 11px;
    color: #666;
}

.vrs-calendar-day.booked .vrs-day-price,
.vrs-calendar-day.pending .vrs-day-price {
    display: none;
}

.vrs-calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    background: var(--vrs-background-color);
    border-radius: 8px;
}

.vrs-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vrs-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Booking Form */
.vrs-booking-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.vrs-booking-form h2 {
    margin: 0 0 25px 0;
    color: var(--vrs-text-color);
    text-align: center;
}

.vrs-form-row {
    margin-bottom: 20px;
}

.vrs-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--vrs-text-color);
}

.vrs-form-row input,
.vrs-form-row select,
.vrs-form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--vrs-border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.vrs-form-row input:focus,
.vrs-form-row select:focus,
.vrs-form-row textarea:focus {
    outline: none;
    border-color: var(--vrs-primary-color);
}

.vrs-form-row.error input,
.vrs-form-row.error select {
    border-color: var(--vrs-danger-color);
}

.vrs-error-message {
    color: var(--vrs-danger-color);
    font-size: 14px;
    margin-top: 5px;
}

.vrs-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.vrs-file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.vrs-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.vrs-file-label {
    display: block;
    padding: 10px;
    background: var(--vrs-background-color);
    border: 2px dashed var(--vrs-border-color);
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
}

.vrs-file-upload:hover .vrs-file-label {
    background: #f0f0f0;
    border-color: var(--vrs-primary-color);
}

.vrs-file-name {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

/* Price Breakdown */
.vrs-price-breakdown {
    background: var(--vrs-background-color);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.vrs-price-breakdown h3 {
    margin: 0 0 15px 0;
    color: var(--vrs-text-color);
}

.vrs-price-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.vrs-price-line:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 18px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid var(--vrs-border-color);
}

.vrs-discount {
    color: var(--vrs-success-color);
}

/* Terms and Conditions */
.vrs-terms-wrapper {
    background: var(--vrs-background-color);
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    max-height: 200px;
    overflow-y: auto;
}

.vrs-terms-wrapper h4 {
    margin: 0 0 10px 0;
}

.vrs-terms-content {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.vrs-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
}

.vrs-checkbox-wrapper input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
}

.vrs-checkbox-wrapper label {
    font-size: 14px;
    line-height: 1.4;
}

/* Submit Button */
.vrs-submit-button {
    width: 100%;
    padding: 15px;
    background: var(--vrs-primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 20px;
}

.vrs-submit-button:hover {
    background: #45a049;
}

.vrs-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.vrs-submit-button.loading {
    position: relative;
    color: transparent;
}

.vrs-submit-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid white;
    animation: vrs-spin 1s linear infinite;
}

/* Payment Section */
.vrs-payment-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--vrs-background-color);
    border-radius: 8px;
}

.vrs-payment-section h3 {
    margin: 0 0 20px 0;
    text-align: center;
}

#vrs-card-element {
    padding: 12px;
    border: 1px solid var(--vrs-border-color);
    border-radius: 4px;
    background: white;
}

.vrs-payment-errors {
    color: var(--vrs-danger-color);
    margin-top: 10px;
    font-size: 14px;
}

/* Success/Error Messages */
.vrs-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    text-align: center;
}

.vrs-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.vrs-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Overlay */
.vrs-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.vrs-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--vrs-primary-color);
    border-radius: 50%;
    animation: vrs-spin 1s linear infinite;
}

.vrs-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

@keyframes vrs-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Price Table */
.vrs-price-table {
    margin: 20px 0;
}

.vrs-seasons-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.vrs-seasons-table th,
.vrs-seasons-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.vrs-seasons-table th {
    background: var(--vrs-background-color);
    font-weight: 600;
}

.vrs-price-info {
    background: var(--vrs-background-color);
    padding: 20px;
    border-radius: 8px;
}

.vrs-price-info p {
    margin: 10px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .vrs-calendar-months {
        grid-template-columns: 1fr;
    }
    
    .vrs-form-columns {
        grid-template-columns: 1fr;
    }
    
    .vrs-booking-form-wrapper {
        padding: 20px;
    }
    
    .vrs-calendar-day {
        font-size: 14px;
    }
    
    .vrs-day-price {
        display: none;
    }
    
    .vrs-calendar-legend {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Print Styles */
@media print {
    .vrs-calendar-nav,
    .vrs-booking-form,
    .vrs-submit-button {
        display: none;
    }
    
    .vrs-calendar-wrapper {
        box-shadow: none;
    }
}

.vrs-calendar-wrapper .vrs-calendar-day.booked,
body.astra-theme .vrs-calendar-wrapper .vrs-calendar-day.booked {
    background-color: #dc3545 !important;
    color: white !important;
    border: 1px solid #dc3545 !important;
}

.vrs-calendar-wrapper .vrs-calendar-day.available,
body.astra-theme .vrs-calendar-wrapper .vrs-calendar-day.available {
    background-color: #28a745 !important;
    color: white !important;
    border: 1px solid #28a745 !important;
}