/**
 * DS Parts - Order Form Stylesheet (Modern Checkout)
 * Matching Wildberries UX/UI with DS Parts branding (#0089e5)
 */

.bee-form-w {
    width: 100%;
    max-width: 1240px;
    margin: 40px auto 0;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    scroll-margin-top: 130px;
}

.bee-form-container {
    width: 100%;
}

.bee-form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin: 0;
}

.bee-form header {
    padding: 22px 28px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.bee-form .form-name {
    font-size: 20px;
    font-weight: 700;
    color: #1e242d;
}

.bee-form fieldset {
    padding: 24px 28px;
    border: none;
    background: #ffffff;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 0;
    width: 100%;
}

.bee-form .field-w {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 3 Equal Columns on Row 1: Name, Email, Phone fill 100% width */
.bee-form .field-name {
    grid-column: 1 / 2;
}

.bee-form .field-email {
    grid-column: 2 / 3;
}

.bee-form .field-phone {
    grid-column: 3 / 4;
}

.bee-form .label__text,
.bee-form .select-with-image__title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    display: block;
}

.bee-form .input,
.bee-form .select,
.bee-form .textarea {
    position: relative;
    display: block;
    margin: 0;
}

/* Text Inputs with Icon */
.bee-form .input input {
    width: 100%;
    height: 48px;
    padding: 10px 16px 10px 44px;
    font-size: 14px;
    color: #1e242d;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.bee-form .input input:focus {
    background: #ffffff;
    border-color: #0089e5;
    box-shadow: 0 0 0 3px rgba(0, 137, 229, 0.15);
}

.bee-form .icon-append {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.2s ease;
    line-height: 1;
}

.bee-form .icon-append svg {
    display: block;
    stroke: #94a3b8;
    transition: stroke 0.2s ease;
}

.bee-form .input input:focus ~ .icon-append svg {
    stroke: #0089e5;
}

/* Full width fields: Address and Comment */
.bee-form .field-address,
.bee-form .field-adres,
.bee-form .field-type-textarea,
.bee-form .field-comment {
    grid-column: 1 / -1;
    width: 100%;
}

.bee-form .textarea {
    width: 100%;
}

.bee-form .textarea textarea {
    width: 100%;
    min-height: 85px;
    padding: 14px 16px;
    font-size: 14px;
    color: #1e242d;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    resize: vertical;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.bee-form .textarea textarea:focus {
    background: #ffffff;
    border-color: #0089e5;
    box-shadow: 0 0 0 3px rgba(0, 137, 229, 0.15);
}

/* Select */
.bee-form .select select {
    width: 100%;
    height: 48px;
    padding: 10px 36px 10px 16px;
    font-size: 14px;
    color: #1e242d;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.bee-form .select .icon-append {
    left: auto;
    right: 15px;
}

/* Delivery & Payment Selection Cards */
.bee-form .select-with-image {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bee-form .select-with-image__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bee-form .select-with-image__label:hover {
    border-color: #c8e4fa;
    background: #f0f7fd;
}

.bee-form .select-with-image__text {
    font-size: 14px;
    font-weight: 600;
    color: #1e242d;
}

.bee-form .select-with-image__description {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.bee-form .select-with-image__price {
    font-size: 14px;
    font-weight: 700;
    color: #0089e5;
}

/* Errors */
.bee-form .invalid,
.bee-form .form-error-text {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    font-style: normal;
    display: block;
}

.bee-form .state-error input,
.bee-form .state-error select,
.bee-form .state-error textarea {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.bee-form .message-error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 14px 20px;
    margin: 16px 28px 0;
    border-radius: 8px;
    color: #991b1b;
}

/* Footer & Personal Agreement */
.bee-form footer {
    padding: 20px 28px 24px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.personal_agree-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 650px;
}

.personal-agree-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

/* Hide native checkbox */
.styled-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

/* Custom checkbox box */
.custom-agree-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.styled-checkbox:checked + .custom-agree-checkbox {
    background: #0089e5;
    border-color: #0089e5;
}

.styled-checkbox:checked + .custom-agree-checkbox::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.is-personal-agree {
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}

.is-personal-agree a {
    color: #0089e5;
    text-decoration: underline;
}

.is-personal-agree a:hover {
    color: #0072c4;
}

/* Submit Button */
.bee-form-actions {
    display: flex;
    justify-content: flex-end;
}

.bee-form .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 36px;
    background: #0089e5;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 137, 229, 0.35);
    transition: all 0.2s ease;
}

.bee-form .button:hover {
    background: #0072c4;
    box-shadow: 0 6px 20px rgba(0, 137, 229, 0.45);
    transform: translateY(-1px);
}

.bee-form .button:active {
    transform: translateY(0);
}

/* SUCCESS BOX & PAYMENT */
.bee-form-success-box {
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.bee-form-success-box .message-ok {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #ecfdf5;
    border-radius: 12px;
    border: 1px solid #a7f3d0;
}

.bee-form-success-box h3 {
    font-size: 22px;
    font-weight: 700;
    color: #065f46;
    margin: 0;
}

.bee-form-success-box p {
    font-size: 15px;
    color: #047857;
    margin: 0;
}

/* Tinkoff Payment Button */
.rover-tinkoff-payform input[type="submit"],
.bee-form-success-box input[type="submit"],
.bee-form-success-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 36px;
    background: #0089e5 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(0, 137, 229, 0.35) !important;
    transition: all 0.2s ease !important;
    margin-top: 16px;
}

.rover-tinkoff-payform input[type="submit"]:hover,
.bee-form-success-box input[type="submit"]:hover {
    background: #0072c4 !important;
    box-shadow: 0 6px 20px rgba(0, 137, 229, 0.45) !important;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .bee-form header,
    .bee-form fieldset,
    .bee-form footer {
        padding: 16px 18px;
    }

    .bee-form fieldset {
        grid-template-columns: 1fr;
    }

    .bee-form .field-name,
    .bee-form .field-email,
    .bee-form .field-phone {
        grid-column: 1 / -1;
    }

    .bee-form footer {
        flex-direction: column;
        align-items: stretch;
    }

    .bee-form .button {
        width: 100%;
    }
}