/**
 * Forms Styles
 * 
 * Styling for email popup form and callback form
 */

/* Modal Overlay */
.abvb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abvb-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.abvb-modal__content {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.abvb-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abvb-modal__close:hover {
    color: #000;
}

.abvb-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}

/* Form Styles */
.abvb-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.abvb-form__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.abvb-form__group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.abvb-form__group input,
.abvb-form__group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.abvb-form__group input:focus,
.abvb-form__group textarea:focus {
    outline: none;
    border-color: #0c7a3a;
    box-shadow: 0 0 0 3px rgba(12, 122, 58, 0.1);
}

/* Callback Form Wrapper */
.callback-form-wrapper {
    margin-top: var(--space-3, 16px);
    padding: var(--space-4, 20px);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border, #ddd);
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.callback-form-fields {
    display: flex;
    flex-direction: column;
    gap: var(--space-3, 12px);
    margin-bottom: var(--space-3, 12px);
}

.callback-form-fields input {
    padding: 12px;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--color-bg, white);
    color: var(--color-text, #333);
}

.callback-form-fields input:focus {
    outline: none;
    border-color: var(--color-primary, #ACD400);
    box-shadow: 0 0 0 3px rgba(172, 212, 0, 0.1);
}

.callback-form-fields input::placeholder {
    color: var(--color-muted, #999);
}

.callback-form-actions {
    display: flex;
    gap: var(--space-2, 8px);
}

.btn-callback-submit,
.btn-callback-cancel {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-callback-submit {
    background: var(--color-primary, #ACD400);
    color: var(--color-bg, #1a1a1a);
}

.btn-callback-submit:hover {
    background: #9BC300;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(172, 212, 0, 0.3);
}

.btn-callback-submit.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn-callback-cancel {
    background: transparent;
    color: var(--color-text, #333);
    border: 1px solid var(--color-border, #ddd);
}

.btn-callback-cancel:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Legacy Callback Input (kept for backwards compatibility) */
.js-callback-input {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.js-callback-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.js-callback-input button {
    padding: 10px 20px;
    background: #0c7a3a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.js-callback-input button:hover {
    background: #095a2a;
}

/* Loading State */
.abvb-form.loading button,
.js-callback-input.loading button {
    opacity: 0.6;
    pointer-events: none;
}

.abvb-form.loading button::after,
.js-callback-input.loading button::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Success Message */
.abvb-form-success {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Error Message */
.abvb-form-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .abvb-modal__content {
        padding: 30px 20px;
    }

    .abvb-modal h2 {
        font-size: 20px;
    }
}