/* SpaySync Forms - Embeddable Form Styles */

:root {
    --primary-color: #0066cc;
    --primary-hover: #0052a3;
    --error-color: #c60f13;
    --success-color: #2e7d32;
    --border-color: #ddd;
    --background-light: #f5f5f5;
    --text-color: #333;
    --text-muted: #666;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Form Container */
.spay-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Fieldsets */
fieldset {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

legend {
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0 10px;
    color: var(--primary-color);
}

/* Form Groups */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row > .form-group {
    flex: 1;
    min-width: 200px;
}

/* Labels */
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.required {
    color: var(--error-color);
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

input.invalid,
select.invalid,
textarea.invalid {
    border-color: var(--error-color);
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover,
.checkbox-option:hover {
    background-color: var(--background-light);
}

.radio-option.selected,
.checkbox-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(0, 102, 204, 0.05);
}

.radio-option input,
.checkbox-option input {
    margin: 0;
}

/* Error Messages */
.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 4px;
}

.validation-summary {
    background-color: #fef2f2;
    border: 1px solid var(--error-color);
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.validation-summary ul {
    margin: 0;
    padding-left: 20px;
}

/* Highlight Box */
.highlight {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 0 4px 4px 0;
}

.highlight.warning {
    background-color: #fef2f2;
    border-left-color: var(--error-color);
}

.highlight.info {
    background-color: #e8f4f8;
    border-left-color: var(--primary-color);
}

/* Pet Section */
.pet-section {
    background-color: var(--background-light);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.pet-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pet-section-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--background-light);
}

.btn-full-width {
    width: 100%;
}

/* Total Amount Display */
.total-display {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    padding: 16px;
    background-color: var(--background-light);
    border-radius: 8px;
    text-align: center;
    margin: 16px 0;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 102, 204, 0.02);
}

.file-upload.has-file {
    border-color: var(--success-color);
    background-color: rgba(46, 125, 50, 0.05);
}

.file-upload input[type="file"] {
    display: none;
}

/* Processing State */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Stripe Elements */
.stripe-element {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
}

.stripe-element.StripeElement--focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.stripe-element.StripeElement--invalid {
    border-color: var(--error-color);
}

/* Availability Notice */
.availability-notice {
    text-align: center;
    padding: 40px 20px;
}

.availability-notice h2 {
    color: var(--error-color);
    margin-bottom: 16px;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message h2 {
    color: var(--success-color);
    margin-bottom: 16px;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }

    .form-row > .form-group {
        min-width: 100%;
    }

    .radio-group,
    .checkbox-group {
        flex-direction: column;
    }
}
