:root {
    --ao-form-font: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
    --ao-form-radius: 12px;
    --ao-form-border: #e0e4ec;
    --ao-form-bg: #ffffff;
    --ao-form-muted: #6f7787;
    --ao-form-heading: #1a1a1a;
    --ao-form-primary: #0098d8;
    --ao-form-primary-dark: #0077ad;
    --ao-form-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.ao-order-form {
    font-family: var(--ao-form-font);
    color: var(--ao-form-heading);
}

.ao-order-form input,
.ao-order-form select,
.ao-order-form textarea {
    border-radius: var(--ao-form-radius);
    border: 1px solid var(--ao-form-border);
    padding: 12px 16px;
    /* width: 100%; */ /* Zakomentowane - szerokość kontrolowana przez media queries w custom.css */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ao-order-form input:focus,
.ao-order-form select:focus,
.ao-order-form textarea:focus {
    border-color: var(--ao-form-primary);
    box-shadow: 0 0 0 3px rgba(0, 152, 216, 0.15);
    outline: none;
}

.ao-order-form input[readonly],
.ao-order-form select[readonly],
.ao-order-form textarea[readonly] {
    background: #f7f7f8;
    color: var(--ao-form-muted);
    cursor: not-allowed;
}

.ao-order-form .ao-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 18px;
}

.ao-order-form .ao-form-row.full-width {
    grid-template-columns: 1fr;
}

.ao-order-form .ao-input-error {
    border-color: #d93025;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.15);
}

.ao-order-form .ao-error-message {
    color: #d93025;
    font-size: 0.85rem;
    margin-top: 6px;
}

.ao-conditional-group {
    margin-bottom: 18px;
}

.ao-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--ao-form-radius);
    border: 1px solid var(--ao-form-border);
    background: #f5f7fb;
    cursor: pointer;
}

.ao-toggle-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ao-toggle-text {
    flex: 1;
    font-weight: 500;
    color: var(--ao-form-heading);
}

.ao-toggle-icon {
    color: var(--ao-form-primary);
    font-weight: 700;
}

.ao-conditional-content {
    margin-top: 12px;
    border: 1px solid var(--ao-form-border);
    border-radius: var(--ao-form-radius);
    padding: 16px;
    background: var(--ao-form-bg);
}

.ao-input-wrapper,
.ao-textarea-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ao-input-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ao-form-muted);
}

@media (max-width: 768px) {
    .ao-order-form {
        padding-left: 0;
        padding-right: 0;
    }

    .ao-order-form .ao-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Full width inputs on mobile for better UX */
    .ao-order-form input,
    .ao-order-form select,
    .ao-order-form textarea {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ao-order-form *,
    .ao-order-form *::before,
    .ao-order-form *::after {
        transition: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
