/**
 * InnoSchedule Quick Widget - Base Styles
 * Core structure that applies to all widget styles
 * 
 * @package InnoSchedule
 * @since 2.1.30
 */

/* Reset and Base Styles */
.inno-quick-widget {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    color: #333;
    position: relative;
    margin: 0 auto;
    max-width: 100%;
}

.inno-quick-widget *,
.inno-quick-widget *::before,
.inno-quick-widget *::after {
    box-sizing: inherit;
}

/* Widget Header */
.inno-quick-widget .widget-header {
    margin-bottom: 20px;
}

.inno-quick-widget .widget-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a365d;
    line-height: 1.2;
}

/* Form Structure */
.inno-quick-widget .widget-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.inno-quick-widget .form-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.inno-quick-widget .form-field-container {
    flex: 1;
    min-width: 0;
}

/* Form Fields */
.inno-quick-widget .form-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.inno-quick-widget .form-field:focus {
    border-color: #1F5FFF;
    box-shadow: 0 0 0 3px rgba(31, 95, 255, 0.1);
}

.inno-quick-widget .form-field::placeholder {
    color: #a0aec0;
}

.inno-quick-widget .form-field:invalid {
    border-color: #e53e3e;
}

/* Select Field Styling */
.inno-quick-widget select.form-field {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23a0aec0" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

.inno-quick-widget select.form-field:focus {
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%231F5FFF" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
}

/* Submit Button */
.inno-quick-widget .btn-book {
    width: 100%;
    padding: 16px 32px;
    background: #1F5FFF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
    position: relative;
    overflow: hidden;
}

.inno-quick-widget .btn-book:hover {
    background: #0d47e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 95, 255, 0.3);
}

.inno-quick-widget .btn-book:active {
    transform: translateY(0);
}

.inno-quick-widget .btn-book:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button Loading State */
.inno-quick-widget .btn-loading .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: inno-quick-spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes inno-quick-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.inno-quick-widget .quick-widget-messages {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.inno-quick-widget .quick-widget-messages.error {
    background: #fed7d7;
    color: #9b2c2c;
    border: 1px solid #feb2b2;
}

.inno-quick-widget .quick-widget-messages.success {
    background: #c6f6d5;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.inno-quick-widget .quick-widget-messages.info {
    background: #bee3f8;
    color: #2c5282;
    border: 1px solid #90cdf4;
}

/* Required Field Indicators */
.inno-quick-widget .form-field[required]::after {
    content: " *";
    color: #e53e3e;
}

/* Responsive Design */
@media (max-width: 768px) {
    .inno-quick-widget .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .inno-quick-widget .widget-title {
        font-size: 20px;
    }
    
    .inno-quick-widget .form-field {
        padding: 14px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .inno-quick-widget .btn-book {
        padding: 18px 32px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .inno-quick-widget {
        margin: 0;
    }
    
    .inno-quick-widget .widget-title {
        font-size: 18px;
        text-align: center;
    }
    
    .inno-quick-widget .form-field {
        padding: 16px;
    }
}

/* Accessibility */
.inno-quick-widget .form-field:focus-visible {
    outline: 2px solid #1F5FFF;
    outline-offset: 2px;
}

.inno-quick-widget .btn-book:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .inno-quick-widget .form-field {
        border-width: 2px;
    }
    
    .inno-quick-widget .btn-book {
        border: 2px solid transparent;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .inno-quick-widget .form-field,
    .inno-quick-widget .btn-book {
        transition: none;
    }
    
    .inno-quick-widget .btn-loading .spinner {
        animation: none;
    }
}

