/**
 * Revma Lead Generation - Form Styles
 */

:root {
    --rlg-primary: #2563eb;
    --rlg-primary-dark: #1d4ed8;
    --rlg-success: #22c55e;
    --rlg-error: #ef4444;
    --rlg-gray-50: #f9fafb;
    --rlg-gray-100: #f3f4f6;
    --rlg-gray-200: #e5e7eb;
    --rlg-gray-300: #d1d5db;
    --rlg-gray-500: #6b7280;
    --rlg-gray-700: #374151;
    --rlg-gray-900: #111827;
}

/* Form Wrapper */
.rlg-form-wrapper {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 500px;
}

.rlg-form-title {
    margin: 0 0 24px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rlg-gray-900);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Form Rows */
.rlg-form-row {
    margin-bottom: 20px;
}

.rlg-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 500px) {
    .rlg-row-2 {
        grid-template-columns: 1fr;
    }
}

/* Fields */
.rlg-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rlg-gray-700);
}

.rlg-field input,
.rlg-field select,
.rlg-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--rlg-gray-200);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.rlg-field input:focus,
.rlg-field select:focus,
.rlg-field textarea:focus {
    outline: none;
    border-color: var(--rlg-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.rlg-field input.error,
.rlg-field select.error {
    border-color: var(--rlg-error);
}

.rlg-field small {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--rlg-gray-500);
}

/* Radio Group */
.rlg-radio-group {
    display: flex;
    gap: 16px;
}

.rlg-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.rlg-radio input {
    width: 18px;
    height: 18px;
    accent-color: var(--rlg-primary);
}

/* Checkbox */
.rlg-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--rlg-gray-700);
}

.rlg-checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--rlg-primary);
}

.rlg-checkbox a {
    color: var(--rlg-primary);
}

/* Submit Button */
.rlg-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--rlg-primary) 0%, var(--rlg-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rlg-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.rlg-submit-btn:disabled {
    background: var(--rlg-gray-300);
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.rlg-spinner {
    width: 20px;
    height: 20px;
    animation: rlg-spin 1s linear infinite;
}

@keyframes rlg-spin {
    to { transform: rotate(360deg); }
}

/* Form Message */
.rlg-form-message {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.rlg-form-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.rlg-form-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Newsletter Form */
.rlg-newsletter-wrapper {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rlg-newsletter-title {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--rlg-gray-900);
}

.rlg-newsletter-desc {
    margin: 0 0 16px;
    font-size: 0.875rem;
    color: var(--rlg-gray-500);
}

.rlg-newsletter-inline {
    display: flex;
    gap: 8px;
}

.rlg-newsletter-inline input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--rlg-gray-200);
    border-radius: 8px;
    font-size: 0.9rem;
}

.rlg-newsletter-inline button {
    padding: 12px 24px;
    background: var(--rlg-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.rlg-newsletter-privacy {
    margin: 12px 0 0;
    font-size: 0.75rem;
    color: var(--rlg-gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Callback Form */
.rlg-callback-wrapper {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
}

.rlg-callback-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.rlg-callback-btn:hover {
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* Quote Form - Multi-step */
.rlg-quote-wrapper {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 600px;
}

.rlg-step {
    display: none;
}

.rlg-step.rlg-step-active {
    display: block;
    animation: rlg-fadeIn 0.3s ease;
}

@keyframes rlg-fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.rlg-step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.rlg-step-number {
    width: 40px;
    height: 40px;
    background: var(--rlg-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.rlg-step-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--rlg-gray-900);
}

/* Option Cards */
.rlg-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 500px) {
    .rlg-options-grid {
        grid-template-columns: 1fr;
    }
}

.rlg-option-card {
    cursor: pointer;
}

.rlg-option-card input {
    display: none;
}

.rlg-option-content {
    padding: 20px;
    border: 2px solid var(--rlg-gray-200);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s;
}

.rlg-option-content svg {
    margin-bottom: 8px;
    color: var(--rlg-gray-500);
}

.rlg-option-content span {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rlg-gray-700);
}

.rlg-option-card input:checked + .rlg-option-content {
    border-color: var(--rlg-primary);
    background: #eff6ff;
}

.rlg-option-card input:checked + .rlg-option-content svg {
    color: var(--rlg-primary);
}

/* Step buttons */
.rlg-step-buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.rlg-next-btn,
.rlg-prev-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rlg-next-btn {
    background: var(--rlg-primary);
    color: white;
    border: none;
    margin-left: auto;
}

.rlg-next-btn:hover {
    background: var(--rlg-primary-dark);
}

.rlg-prev-btn {
    background: white;
    color: var(--rlg-gray-600);
    border: 2px solid var(--rlg-gray-200);
}

.rlg-prev-btn:hover {
    border-color: var(--rlg-gray-300);
}

/* Progress bar */
.rlg-progress {
    height: 4px;
    background: var(--rlg-gray-200);
    border-radius: 2px;
    margin-top: 32px;
    overflow: hidden;
}

.rlg-progress-bar {
    height: 100%;
    background: var(--rlg-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Input with unit */
.rlg-input-with-unit {
    display: flex;
}

.rlg-input-with-unit input {
    flex: 1;
    border-radius: 10px 0 0 10px;
    border-right: none;
}

.rlg-input-with-unit span {
    padding: 12px 16px;
    background: var(--rlg-gray-100);
    border: 2px solid var(--rlg-gray-200);
    border-left: none;
    border-radius: 0 10px 10px 0;
    color: var(--rlg-gray-500);
}

/* Minimal style */
.rlg-style-minimal {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.rlg-style-minimal .rlg-field input,
.rlg-style-minimal .rlg-field select {
    border-radius: 6px;
    border-width: 1px;
}

/* Inline style */
.rlg-style-inline {
    max-width: 100%;
    padding: 16px;
}

.rlg-style-inline .rlg-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.rlg-style-inline .rlg-form-row {
    margin-bottom: 0;
    flex: 1;
    min-width: 150px;
}

.rlg-style-inline .rlg-submit-btn {
    width: auto;
}
