.stalpi-cerere-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #0f5ea7;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease-in-out;
}

.stalpi-cerere-button:hover,
.stalpi-cerere-button:focus {
    background-color: #0c4d87;
}

.stalpi-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-family: inherit;
}

.stalpi-modal.is-open {
    display: flex;
}

body.stalpi-modal-open {
    overflow: hidden;
}

.stalpi-modal__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
}

.stalpi-modal__content {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 1rem;
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    max-height: calc(100vh - 2rem);
}

.stalpi-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

.stalpi-form {
    display: grid;
    gap: 1.5rem;
}

.stalpi-form__section {
    display: grid;
    gap: 1rem;
    padding: 0;
    border: none;
}

.stalpi-form__section--contact {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.stalpi-form__section legend {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 17px;
}

.stalpi-form__section label {
    display: grid;
    gap: 0.313rem;
    font-size: 0.95rem;
}

.stalpi-form__section input,
.stalpi-form__section textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #cfd5db;
    border-radius: 4px;
    font-size: 1rem;
}

.stalpi-form__hint {
    font-size: 0.85rem;
    color: #5a6573;
}

.stalpi-form__products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.stalpi-form__product {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #dce3eb;
    border-radius: 6px;
    background-color: #f9fbfd;
}

.stalpi-form__product .stalpi-form__product-main {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stalpi-form__product-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
}

.stalpi-form__product-name {
    font-weight: 600;
    font-size: 13px;
}

.stalpi-form__product input {
    width: 120px;
}

.stalpi-form__product-price {
    font-weight: 600;
    color: #0f5ea7;
    word-break: break-word;
}

.stalpi-form__product-attributes {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.875rem;
    color: #4f5b67;
}

.stalpi-form__product-attributes li {
    margin-bottom: 0.25rem;
}

.stalpi-form__hint--admin {
    background-color: #f1f5fb;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.stalpi-form__hint--admin a {
    color: #0f5ea7;
    text-decoration: underline;
}

.stalpi-form__notice {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    background-color: #e3f7e9;
    color: #215728;
    border: 1px solid #bde7c6;
}

.stalpi-form__notice--success {
    background-color: #e3f7e9;
    color: #215728;
    border-color: #bde7c6;
}

.stalpi-form__notice--warning {
    background-color: #fff5e5;
    color: #8a5b10;
    border-color: #ffd9a5;
}

.stalpi-form__notice--info {
    background-color: #e7f0ff;
    color: #1c4da3;
    border-color: #c7dcff;
}

.stalpi-form__submit {
    align-self: flex-end;
    padding: 0.75rem 1.5rem;
    background-color: #0f5ea7;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease-in-out;
}

.stalpi-form__submit:hover,
.stalpi-form__submit:focus {
    background-color: #0c4d87;
}

.stalpi-form__product-subtotal {
    font-weight: 600;
    color: #0f5ea7;
}

.stalpi-form__summary {
    padding: 1rem;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(15, 94, 167, 0.08), rgba(15, 94, 167, 0.02));
    border: 1px solid rgba(15, 94, 167, 0.15);
}

.stalpi-form__summary-line {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
}

.stalpi-form__summary-note {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4f5b67;
}

@media (max-width: 768px) {
    .stalpi-form__products-grid {
        grid-template-columns: 1fr;
    }

    .stalpi-form__product {
        grid-template-columns: 1fr;
    }

    .stalpi-form__product-controls {
        align-items: flex-start;
    }

    .stalpi-form__section--contact {
        grid-template-columns: 1fr;
    }
}

