/**
 * Rozgrand Modern Checkout Styles
 */

/* Container */
.checkout_navigator, .roz-checkout-stepper-wrap {
    margin: 20px 0 35px 0;
    width: 100%;
}

/* Stepper Progress Bar */
.roz-checkout-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

.roz-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    cursor: default;
    flex-shrink: 0;
}

.roz-step-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #f0f2f5;
    border: 2px solid #d0d7de;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #656d76;
    margin-bottom: 8px;
    transition: all 0.25s ease;
}

.roz-step-content .roz-step-title {
    font-size: 13px;
    font-weight: 600;
    color: #656d76;
    white-space: nowrap;
    transition: color 0.25s ease;
}

/* Stepper States */
.roz-step-item.step-active .roz-step-badge {
    background-color: #008349;
    border-color: #008349;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 131, 73, 0.2);
    transform: scale(1.08);
}

.roz-step-item.step-active .roz-step-title {
    color: #008349;
    font-weight: 700;
}

.roz-step-item.step-completed .roz-step-badge {
    background-color: #008349;
    border-color: #008349;
    color: #ffffff;
}

.roz-step-item.step-completed .roz-step-title {
    color: #24292f;
}

.roz-step-line {
    flex-grow: 1;
    height: 3px;
    background-color: #e1e4e8;
    margin: 0 8px 24px 8px;
    transition: background-color 0.25s ease;
}

.roz-step-line.line-passed {
    background-color: #008349;
}

/* Hide old table if present */
table#jshop_menu_order {
    display: none !important;
}

/* Checkout Cards */
.roz-checkout-card {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.roz-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.roz-card-header h3, .roz-card-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #24292f;
}

.roz-card-icon {
    font-size: 20px;
    color: #008349;
}

/* Form Controls & Labels in Checkout */
.roz-checkout-wrap .jshop_register {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

@media (max-width: 768px) {
    .roz-checkout-wrap .jshop_register {
        grid-template-columns: 1fr;
    }
}

.roz-checkout-wrap .control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0;
}

.roz-checkout-wrap .control-label.name {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0;
}

.roz-checkout-wrap .control-label.name span {
    color: #e11d48;
    margin-left: 2px;
}

.roz-checkout-wrap input.input,
.roz-checkout-wrap input[type="text"],
.roz-checkout-wrap input[type="email"],
.roz-checkout-wrap input[type="tel"],
.roz-checkout-wrap select.input,
.roz-checkout-wrap select.inputbox,
.roz-checkout-wrap select {
    width: 100% !important;
    max-width: 100% !important;
    height: 44px !important;
    padding: 8px 14px !important;
    font-size: 15px !important;
    color: #1e293b !important;
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.roz-checkout-wrap input.input:focus,
.roz-checkout-wrap input[type="text"]:focus,
.roz-checkout-wrap input[type="email"]:focus,
.roz-checkout-wrap input[type="tel"]:focus,
.roz-checkout-wrap select.input:focus,
.roz-checkout-wrap select.inputbox:focus {
    border-color: #008349 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(0, 131, 73, 0.15) !important;
}

.roz-checkout-wrap .jshop_block_privacy_statement {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.roz-checkout-wrap .jshop_block_privacy_statement .control-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.roz-checkout-wrap .jshop_block_privacy_statement input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    accent-color: #008349;
    cursor: pointer;
}

/* Payment & Shipping Selection Cards */
.roz-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.roz-select-card {
    border: 2px solid #e1e4e8;
    border-radius: 10px;
    padding: 18px 20px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.roz-select-card:hover {
    border-color: #008349;
    box-shadow: 0 4px 12px rgba(0, 131, 73, 0.12);
}

.roz-select-card.selected, .roz-select-card:has(input[type="radio"]:checked) {
    border-color: #008349;
    background-color: #f7fdf9;
    box-shadow: 0 4px 14px rgba(0, 131, 73, 0.15);
}

.roz-select-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.roz-select-top input[type="radio"] {
    accent-color: #008349;
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.roz-select-top label {
    margin: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: #24292f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.roz-select-image img {
    max-height: 32px;
    max-width: 60px;
    object-fit: contain;
}

.roz-select-desc {
    font-size: 13px;
    color: #57606a;
    line-height: 1.4;
    padding-left: 32px;
}

/* Payment Badges */
.roz-payment-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-left: 32px;
}

.roz-badge-pay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    border: 1px solid #d0d7de;
    background: #ffffff;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    user-select: none;
    letter-spacing: 0.3px;
}

.roz-badge-pay.mir {
    background: #007b53;
    color: #ffffff;
    border-color: #007b53;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.roz-badge-pay.sbp {
    background: #191b2a;
    color: #ffffff;
    border-color: #191b2a;
    font-weight: 800;
}

.roz-badge-pay.visa {
    color: #1a1f71;
    font-weight: 900;
    font-style: italic;
}

.roz-badge-pay.mastercard {
    color: #eb001b;
    font-weight: 800;
}

.roz-badge-pay.sberpay {
    background: #21a038;
    color: #ffffff;
    border-color: #21a038;
}

.roz-badge-pay.tpay {
    background: #ffdd2d;
    color: #1a1a1a;
    border-color: #f5cf1a;
}

.roz-badge-pay.invoice {
    background: #f1f5f9;
    color: #0f172a;
    font-size: 12px;
    height: 26px;
    padding: 0 10px;
    gap: 6px;
    border-color: #cbd5e1;
}

.roz-badge-pay.nodds {
    background: #e8f5e9;
    color: #1b5e20;
    border-color: #c8e6c9;
    font-size: 12px;
    height: 26px;
    padding: 0 10px;
    gap: 6px;
}

.roz-select-price {
    font-weight: 700;
    color: #008349;
    font-size: 14px;
    margin-left: auto;
}

.roz-select-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #d0d7de;
    padding-left: 32px;
}

/* Order Summary Table (Preview Step) */
.roz-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
}

.roz-summary-table th {
    background-color: #f6f8fa;
    padding: 10px 14px;
    font-weight: 600;
    text-align: left;
    border: 1px solid #d0d7de;
    color: #24292f;
}

.roz-summary-table td {
    padding: 12px 14px;
    border: 1px solid #e1e4e8;
    vertical-align: middle;
}

.roz-summary-total {
    font-size: 18px;
    font-weight: 800;
    color: #008349;
    text-align: right;
    padding: 16px;
    background: #f7fdf9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    margin: 15px 0;
}

.roz-vat-notice {
    font-size: 13px;
    font-weight: normal;
    color: #666;
    display: block;
    margin-top: 4px;
}

/* Action Buttons */
.roz-checkout-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e4e8;
}

.roz-btn-next, .checkout_payment_block input[type="submit"], .checkout_shipping_block input[type="submit"], .pfinish_comment_block input[type="submit"] {
    background-color: #008349 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 14px 28px !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: background-color 0.2s, box-shadow 0.2s !important;
}

.roz-btn-next:hover, .checkout_payment_block input[type="submit"]:hover, .checkout_shipping_block input[type="submit"]:hover, .pfinish_comment_block input[type="submit"]:hover {
    background-color: #006837 !important;
    box-shadow: 0 4px 12px rgba(0, 131, 73, 0.25) !important;
}

.roz-btn-back {
    color: #57606a;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.roz-btn-back:hover {
    color: #008349;
    text-decoration: underline;
}

/* Success Finish Page */
.roz-finish-box {
    text-align: center;
    padding: 40px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
    max-width: 650px;
    margin: 30px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.roz-finish-icon {
    width: 70px;
    height: 70px;
    background: #e8f5e9;
    color: #008349;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px auto;
}

.roz-finish-title {
    font-size: 26px;
    font-weight: 800;
    color: #24292f;
    margin-bottom: 12px;
}

.roz-finish-text {
    font-size: 16px;
    color: #57606a;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 600px) {
    .roz-step-content .roz-step-title {
        font-size: 11px;
    }
    .roz-step-badge {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    .roz-step-line {
        margin: 0 4px 20px 4px;
    }
    .roz-select-grid {
        grid-template-columns: 1fr;
    }
    .roz-checkout-actions {
        flex-direction: column-reverse;
        gap: 15px;
    }
    .roz-checkout-actions button, .roz-checkout-actions a, .roz-checkout-actions input {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
