/* Shipping & Payment Styles */
.ts-shipping-payment-container {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    padding-bottom: 32px;
}

/* Zásilkovna pickup selection */
.ts-sp-pickup-selection {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.ts-sp-pickup-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 500;
    color: #374151;
}

.ts-sp-pickup-btn {
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.ts-sp-pickup-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

.ts-sp-selected-pickup {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.ts-sp-selected-pickup strong {
    display: block;
    margin-bottom: 5px;
    color: #059669;
    font-size: 14px;
}

.display_branch {
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
}

/* Zásilkovna pickup info styles */
.zasilkovna-pickup-info {
    margin-top: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.1);
    position: relative;
}

.pickup-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pickup-info-icon {
    width: 20px;
    height: 20px;
    background: #0ea5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.pickup-info-title {
    font-size: 14px;
    font-weight: 600;
    color: #0369a1;
    margin: 0;
}

.pickup-info-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.pickup-info-details {
    flex: 1;
}

.pickup-info-name {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.pickup-info-address {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.3;
}

.pickup-change-btn {
    padding: 6px 12px !important;
    background: #ec4899 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    min-width: 60px !important;
}

.pickup-change-btn:hover {
    background: #db2777 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(236, 72, 153, 0.3) !important;
}

.pickup-change-btn:active {
    transform: translateY(0) !important;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .ts-cart-item-total,
    .ts-cart-item-price {
        align-self: center;
    }
    
    .ts-cart-item-remove {
        right: 10px;
        top: auto;
    }
}

/* Cart Container for second step */
.ts-cart-container {
    padding-top: 32px;
}

/* Checkout Steps Navigation - copied from cart */
.ts-checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 48px;
    padding: 32px 20px;
    max-width: 900px;
}

.ts-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    color: #666;
    font-weight: 400;
    position: relative;
}

.ts-step.active {
    color: #000;
}

.ts-step.active .ts-step-label {
    font-weight: 500;
}

.ts-step.completed {
    color: #000;
}

.ts-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 400;
    background: #fff;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.ts-step.active .ts-step-number {
    border-color: #000;
    background: #fff;
    color: #000;
    border-width: 2px;
    font-weight: 500;
}

.ts-step.completed .ts-step-number {
    border-color: #10b981;
    background: #10b981;
    color: #fff;
    font-size: 0;
}

.ts-step.completed .ts-step-number::after {
    content: '✓';
    font-size: 16px;
    font-weight: 600;
}

.ts-step-label {
    white-space: nowrap;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 400;
}

.ts-step-divider {
    width: 160px;
    height: 1px;
    background: #ddd;
    margin: 0 24px;
    position: relative;
}

.ts-step.completed + .ts-step-divider {
    background: #10b981;
}

@media (max-width: 768px) {
    .ts-checkout-steps {
        padding: 0 10px;
    }
    
    .ts-step-label {
        display: none;
    }
    
    .ts-step-divider {
        width: 60px;
        margin: 0 10px;
    }
    
    .ts-step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

.ts-shipping-payment-content {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 32px;
    max-width: 1240px;
    margin: 0 auto;
    margin-bottom: 30px;
    padding: 0 20px;
}

/* Left Column */
.ts-sp-left-column {
    background: transparent;
    padding: 0;
}

.ts-sp-section {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ts-sp-section:first-child {
    padding-top: 0;
}

.ts-sp-section:last-child {
    margin-bottom: 0;
}

.ts-sp-title {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* Form Elements */
.ts-sp-form-row {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 16px;
    margin-bottom: 24px;
}

.ts-sp-form-group {
    display: flex;
    flex-direction: column;
}

.ts-sp-form-group label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.ts-sp-select {
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ts-sp-select:hover {
    border-color: #999;
}

.ts-sp-select:focus {
    outline: none;
    border-color: #000;
}

/* Shipping Methods */
.ts-sp-shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ts-sp-method-item {
    display: block;
    cursor: pointer;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.ts-sp-method-item:hover {
    border-color: #0EA5E9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ts-sp-method-item.selected {
    border-color: #0EA5E9;
    background: #f8fdff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.ts-sp-method-item.selected::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #0EA5E9;
    border-radius: 50%;
    background: #fff;
}



.ts-sp-method-item input[type="radio"] {
    display: none;
}

.ts-sp-method-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ts-sp-method-left {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 32px;
}

.ts-sp-method-logo {
    width: 48px;
    height: 32px;
    object-fit: contain;
}

.ts-sp-method-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-sp-method-name {
    font-size: 15px;
    color: #111;
    font-weight: 500;
}

.ts-sp-method-tooltip {
    color: #999;
    cursor: help;
    font-size: 14px;
}

.ts-sp-method-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ts-sp-method-time {
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
    background: #f0fdf4;
    padding: 4px 8px;
    border-radius: 4px;
}

.ts-sp-method-time.ts-sp-free {
    color: #0EA5E9;
    background: #f0f9ff;
}

.ts-sp-method-time.ts-sp-urgent {
    color: #ef4444;
    background: #fef2f2;
}

.ts-sp-method-price {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    min-width: 60px;
    text-align: right;
}

/* Payment Methods */
.ts-sp-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ts-sp-payment-item {
    display: block;
    cursor: pointer;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px 16px 16px 48px;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.ts-sp-payment-item:hover {
    border-color: #0EA5E9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ts-sp-payment-item.selected {
    border-color: #0EA5E9;
    background: #f8fdff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.ts-sp-payment-item.selected::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #0EA5E9;
    border-radius: 50%;
    background: #fff;
}

.ts-sp-payment-item.selected::after {
    content: '';
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #0EA5E9;
    border-radius: 50%;
}

.ts-sp-payment-item input[type="radio"] {
    display: none;
}

.ts-sp-payment-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ts-sp-payment-name {
    font-size: 15px;
    color: #111;
    font-weight: 500;
}

.ts-sp-payment-icons {
    display: flex;
    gap: 8px;
}

.ts-sp-payment-icons img {
    height: 24px;
}

.ts-sp-payment-extra {
    font-size: 14px;
    color: #666;
}

/* Right Column - Summary */
.ts-sp-right-column {
    position: sticky;
    top: 196px;
    height: fit-content;
}

.ts-sp-summary {
    background: #f9fafb;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ts-sp-summary-title {
    font-size: 18px;
    font-weight: 600;
    color: #666;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Products List */
.ts-sp-products {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e5e5;
}

.ts-sp-product-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ts-sp-product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ts-sp-product-name {
    font-size: 14px;
    color: #111;
}

.ts-sp-product-qty {
    font-size: 12px;
    color: #666;
}

.ts-sp-product-price {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

/* Gifts */
.ts-sp-gifts {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.ts-sp-gift-label {
    background: #10b981;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.ts-sp-gift-tag {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* Totals */
.ts-sp-totals {
    background: #ffffff;
    border-radius: 6px;
    padding: 16px;
    margin-top: 20px;
    margin-bottom: 24px;
}

.ts-sp-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: #6b7280;
}

.ts-sp-total-row:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}

.ts-sp-total-row.ts-sp-total-final {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    padding-top: 14px;
    margin-top: 8px;
}

.ts-sp-total-row.ts-sp-total-final strong {
    font-size: 18px;
    color: #111827;
}

.ts-sp-total-row.ts-sp-vat {
    font-size: 13px;
    color: #9ca3af;
    border: none;
    padding-top: 4px;
}

.ts-sp-discount {
    color: #059669 !important;
    font-weight: 600;
}

/* Continue Button */
button.ts-sp-continue-btn, .ts-sp-continue-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 14px 24px !important;
    background: #12C65E !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
    margin-top: 24px !important;
    border: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    user-select: none !important;
    text-align: center !important;
}

button.ts-sp-continue-btn:hover, .ts-sp-continue-btn:hover {
    background: #12B153 !important;
    color: white !important;
    text-decoration: none !important;
}

.ts-sp-continue-btn svg {
    width: 20px;
    height: 20px;
}

/* Enhanced Form Styling for Customer Info */
.ts-sp-section .ts-sp-form-row {
    margin-bottom: 20px;
}

.ts-sp-section .ts-sp-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ts-sp-section .ts-sp-form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-bottom: 4px;
}

.ts-sp-section .ts-sp-form-group label span[style*="color: red"] {
    color: #EF4444;
    font-weight: 500;
}

.ts-sp-section .ts-sp-input,
.ts-sp-section .ts-sp-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    font-size: 15px;
    color: #374151;
    background-color: #FFFFFF;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.ts-sp-section .ts-sp-input:focus,
.ts-sp-section .ts-sp-select:focus {
    outline: none;
    border-color: #12C65E;
    box-shadow: 0 0 0 3px rgba(18, 198, 94, 0.1);
}

.ts-sp-section .ts-sp-input:hover,
.ts-sp-section .ts-sp-select:hover {
    border-color: #D1D5DB;
}

/* Validation states - only applied via JavaScript */
.ts-sp-section .ts-sp-input.field-valid {
    border-color: #10B981;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%2310b981"><path d="M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z"/></svg>');
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    background-size: 16px 16px;
    padding-right: 40px;
}

.ts-sp-section .ts-sp-input.field-error {
    border-color: #EF4444;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23ef4444"><path d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>');
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    background-size: 16px 16px;
    padding-right: 40px;
}

/* Enhanced checkbox styling */
.ts-sp-section input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-right: 10px;
    flex-shrink: 0;
}

.ts-sp-section input[type="checkbox"]:checked {
    background-color: #12C65E;
    border-color: #12C65E;
}

.ts-sp-section input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.ts-sp-section input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(18, 198, 94, 0.1);
}

/* Enhanced section headers */
.ts-sp-section .ts-sp-title {
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #F3F4F6;
    position: relative;
}

.ts-sp-section .ts-sp-title::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #F35FD3;
}

/* Form section styling */
.ts-sp-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Shipping address section - hidden by default */
#shipping_address {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
}

#shipping_address .ts-sp-title {
    font-size: 16px;
    color: #374151;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E5E7EB;
}

#shipping_address .ts-sp-title::before {
    width: 30px;
    height: 1px;
    background-color: #F35FD3;
}

/* Two-column layout for name fields */
.ts-sp-form-row.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Three-column layout for city/postal */
.ts-sp-form-row.three-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

/* Responsive design */
@media (max-width: 768px) {
    .ts-sp-form-row.two-columns,
    .ts-sp-form-row.three-columns {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .ts-sp-section {
        padding: 16px;
        margin-bottom: 16px;
    }
}

/* Back Link */
.ts-sp-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #0EA5E9;
    text-decoration: none;
    font-size: 14px;
    margin-top: 16px;
    transition: color 0.2s;
}

.ts-sp-back-link:hover {
    color: #0284c7;
}

/* Enhanced visual effects */
.ts-sp-form-group input:focus + .ts-sp-floating-label {
    transform: translateY(-20px) scale(0.85);
    color: #12C65E;
}

.ts-sp-input:focus::placeholder {
    opacity: 0.7;
}

/* Form validation styling removed - now handled by JavaScript classes */

/* Add side padding to country selects */
#delivery_country, #billing_country {
    padding: 0 16px !important;
}

/* Remove top and bottom padding from currency select */
select[name="currency"], #currency, .currency select {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Newsletter checkbox specific styling */
.ts-sp-newsletter-row {
    display: block !important;
    margin: 0 !important;
}

/* Loading animation for form submission */
.ts-sp-continue-btn.loading {
    position: relative;
    color: transparent !important;
}

.ts-sp-continue-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced section spacing */
.ts-sp-section:first-child {
    padding-top: 20px;
}

.ts-sp-section + .ts-sp-section {
    margin-top: 40px;
}

.ts-sp-title {
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.ts-sp-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #F35FD3;
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 1024px) {
    .ts-shipping-payment-content {
        grid-template-columns: 1fr;
    }
    
    .ts-sp-right-column {
        position: relative;
        top: 0;
    }
    
    .ts-sp-section + .ts-sp-section {
        margin-top: 32px;
    }
}

@media (max-width: 768px) {
    .ts-sp-left-column {
        padding: 20px;
    }
    
    .ts-sp-form-row {
        grid-template-columns: 1fr;
    }
    
    .ts-sp-method-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ts-sp-method-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .ts-sp-section + .ts-sp-section {
        margin-top: 24px;
    }
    
    .ts-sp-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
}