/* KML Frontend Checkout Styles - Simple, Clean, Premium */
:root {
    --kml-primary: #1a4d3e;
    --kml-primary-dark: #143d31;
    --kml-secondary: #f8f9fa;
    --kml-border: #dee2e6;
    --kml-text: #212529;
    --kml-text-muted: #6c757d;
    --kml-white: #ffffff;
    --kml-radius: 6px;
}

.kml-checkout-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--kml-text);
    line-height: 1.5;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.kml-checkout-wrapper[dir="rtl"] { direction: rtl; text-align: right; }

.kml-language-switcher {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.kml-language-select {
    padding: 6px 12px;
    border: 1px solid var(--kml-border);
    border-radius: var(--kml-radius);
    font-size: 14px;
    background: var(--kml-white);
}

.kml-checkout-container {
    background: var(--kml-white);
    border: 1px solid var(--kml-border);
    border-radius: var(--kml-radius);
    overflow: hidden;
}

.kml-form-section {
    padding: 25px;
    border-bottom: 1px solid var(--kml-border);
}

.kml-form-title {
    margin: 0 0 25px 0;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.kml-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.kml-form-group { flex: 1; }
.kml-form-group.kml-full-width { width: 100%; }

.kml-form-group input,
.kml-form-group select,
.kml-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--kml-border);
    border-radius: var(--kml-radius);
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.kml-form-group input:focus,
.kml-form-group select:focus,
.kml-form-group textarea:focus {
    outline: none;
    border-color: var(--kml-primary);
}

.kml-shipping-row .kml-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.kml-shipping-options { display: flex; gap: 20px; }

.kml-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.kml-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--kml-primary);
}

.kml-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.kml-btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--kml-radius);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    flex: 1;
    min-width: 140px;
    transition: background-color 0.2s;
}

.kml-btn-primary { background: var(--kml-primary); color: var(--kml-white); }
.kml-btn-primary:hover { background: var(--kml-primary-dark); }
.kml-btn-secondary { background: var(--kml-white); color: var(--kml-primary); border: 2px solid var(--kml-primary); }
.kml-btn-secondary:hover { background: var(--kml-secondary); }

.kml-quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--kml-border);
    border-radius: var(--kml-radius);
    overflow: hidden;
}

.kml-qty-btn {
    width: 40px;
    height: 46px;
    border: none;
    background: var(--kml-secondary);
    font-size: 18px;
    cursor: pointer;
}

.kml-qty-btn:hover { background: var(--kml-border); }

.kml-quantity-control input {
    width: 50px;
    height: 46px;
    border: none;
    text-align: center;
    font-size: 16px;
    padding: 0;
    -moz-appearance: textfield;
}

.kml-quantity-control input::-webkit-outer-spin-button,
.kml-quantity-control input::-webkit-inner-spin-button { -webkit-appearance: none; }

.kml-summary-section {
    padding: 25px;
    background: var(--kml-secondary);
}

.kml-summary-title {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--kml-border);
}

.kml-product-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--kml-border);
}

.kml-product-info { display: flex; gap: 12px; }

.kml-product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--kml-border);
}

.kml-product-details { display: flex; flex-direction: column; gap: 4px; }
.kml-product-name { font-weight: 500; font-size: 14px; }

.kml-product-qty {
    display: inline-block;
    background: var(--kml-primary);
    color: var(--kml-white);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.kml-product-price { font-weight: 600; font-size: 15px; white-space: nowrap; }

.kml-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
}

.kml-summary-label { color: var(--kml-text-muted); }
.kml-summary-value { font-weight: 500; }

.kml-total-row {
    border-top: 2px solid var(--kml-border);
    margin-top: 10px;
    padding-top: 15px;
}

.kml-total-row .kml-summary-label { font-weight: 600; color: var(--kml-text); }
.kml-total-price { font-size: 18px; font-weight: 700; color: var(--kml-primary); }

.kml-messages { margin-top: 15px; }

.kml-message {
    padding: 12px 15px;
    border-radius: var(--kml-radius);
    font-size: 14px;
    margin-bottom: 10px;
}

.kml-message-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.kml-message-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.kml-no-product { text-align: center; padding: 20px; color: var(--kml-text-muted); }
.kml-btn.loading { opacity: 0.7; cursor: not-allowed; }

@media (max-width: 600px) {
    .kml-checkout-wrapper { padding: 10px; }
    .kml-form-row { flex-direction: column; gap: 10px; }
    .kml-form-actions { flex-direction: column; }
    .kml-btn { min-width: 100%; }
    .kml-quantity-control { width: 100%; justify-content: center; }
    .kml-shipping-options { flex-direction: column; gap: 10px; }
    .kml-product-item { flex-direction: column; gap: 10px; }
    .kml-product-price { align-self: flex-end; }
}
