/**
 * WooCommerce Watercraft v3.2.3
 * Kolory: #038CCA (brand blue)
 * Premium checkout design
 */

/* ==== UKRYJ STANDARDOWE POLA WOOCOMMERCE ==== */
.woocommerce-billing-fields,
.woocommerce-shipping-fields,
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-additional-fields {
    display: none !important;
}

/* ==== 1. NAPIS NA ZAMÓWIENIE ==== */
.cart-item-backorder-notice {
    color: #e67e00;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e6 100%);
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid #ff9500;
}

/* ==== 2. UDOSTĘPNIANIE KOSZYKA ==== */
.cart-share-section {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.share-cart-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #038CCA 0%, #0277a8 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(3, 140, 202, 0.25);
}

.share-cart-button:hover {
    background: linear-gradient(135deg, #0277a8 0%, #026090 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(3, 140, 202, 0.35);
}

.cart-share-notice {
    display: none;
    margin-top: 15px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: none;
    border-radius: 10px;
    color: #166534;
    font-size: 14px;
    font-weight: 500;
}

.cart-share-notice.show {
    display: block;
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==== 3. MODAL PRZYWRACANIA KOSZYKA ==== */
.wc-restore-cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wc-restore-cart-modal.show {
    opacity: 1;
}

.wc-restore-cart-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 420px;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.wc-restore-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.wc-restore-cart-content h3 {
    font-size: 22px;
    margin: 0 0 10px 0;
    color: #1e293b;
    font-weight: 700;
}

.wc-restore-cart-content p {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.wc-restore-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.wc-btn-restore,
.wc-btn-dismiss {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wc-btn-restore {
    background: linear-gradient(135deg, #038CCA 0%, #0277a8 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(3, 140, 202, 0.3);
}

.wc-btn-restore:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(3, 140, 202, 0.4);
}

.wc-btn-dismiss {
    background: #f1f5f9;
    color: #64748b;
}

.wc-btn-dismiss:hover {
    background: #e2e8f0;
}

/* ==== 4. CHECKOUT WRAPPER ==== */
.wc-watercraft-checkout-wrapper {
    max-width: 100%;
    margin-bottom: 30px;
}

.wc-section-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 22px 0;
    color: #1e293b;
    padding-bottom: 14px;
    border-bottom: none;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wc-section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, #038CCA 0%, #0277a8 100%);
    border-radius: 2px;
}

.wc-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, #038CCA 0%, transparent 50%);
}

/* ==== SEKCJE - WSPÓLNE STYLE ==== */
.wc-shipping-section,
.wc-document-type-selector,
.wc-invoice-section,
.wc-order-notes-section {
    background: #fff;
    padding: 26px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.wc-shipping-section:hover,
.wc-document-type-selector:hover,
.wc-invoice-section:hover,
.wc-order-notes-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ==== KARTY ADRESÓW I FAKTUR ==== */
.wc-saved-addresses,
.wc-saved-invoices {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.wc-address-card,
.wc-invoice-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 18px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wc-address-card:hover,
.wc-invoice-card:hover {
    border-color: #038CCA;
    box-shadow: 0 4px 20px rgba(3, 140, 202, 0.12);
    transform: translateY(-1px);
}

.wc-address-card.active,
.wc-invoice-card.active {
    border-color: #038CCA;
    background: linear-gradient(135deg, #eff9ff 0%, #e0f4ff 100%);
    box-shadow: 0 4px 20px rgba(3, 140, 202, 0.15);
}

/* Custom radio buttons */
.wc-address-card input[type="radio"],
.wc-invoice-card input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    margin-right: 16px;
    margin-top: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.wc-address-card input[type="radio"]:checked,
.wc-invoice-card input[type="radio"]:checked {
    border-color: #038CCA;
    border-width: 6px;
    background: #fff;
}

.wc-address-content,
.wc-invoice-content {
    flex: 1;
    min-width: 0;
}

.wc-address-name,
.wc-invoice-company {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.wc-address-details,
.wc-invoice-address {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 4px;
}

.wc-address-email {
    font-size: 13px;
    color: #64748b;
}

.wc-invoice-nip {
    display: inline-block;
    font-size: 12px;
    color: #038CCA;
    font-weight: 700;
    margin-bottom: 8px;
    background: rgba(3, 140, 202, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.wc-address-actions,
.wc-invoice-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
    flex-shrink: 0;
}

.wc-address-edit,
.wc-address-delete,
.wc-invoice-edit,
.wc-invoice-delete {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-address-edit,
.wc-invoice-edit {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
}

.wc-address-edit:hover,
.wc-invoice-edit:hover {
    background: linear-gradient(135deg, #038CCA 0%, #0277a8 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(3, 140, 202, 0.35);
}

.wc-address-delete,
.wc-invoice-delete {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.wc-address-delete:hover,
.wc-invoice-delete:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

/* ==== PRZYCISK DODAJ ==== */
.wc-add-address-btn,
.wc-add-invoice-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed #94a3b8;
    border-radius: 14px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wc-add-address-btn:hover,
.wc-add-invoice-btn:hover {
    background: linear-gradient(135deg, #eff9ff 0%, #e0f4ff 100%);
    border-color: #038CCA;
    border-style: dashed;
    color: #038CCA;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(3, 140, 202, 0.1);
}

.wc-btn-icon {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

/* ==== FORMULARZ ADRESU / FAKTURY ==== */
.wc-address-form,
.wc-invoice-form {
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    margin-top: 16px;
}

.wc-form-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.wc-form-field {
    display: flex;
    flex-direction: column;
}

.wc-form-field.wc-full-width {
    grid-column: span 2;
}

.wc-form-field label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #475569;
}

.wc-form-field label .required {
    color: #ef4444;
    margin-left: 2px;
}

.wc-input {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    background: #fff;
}

.wc-input:focus {
    outline: none;
    border-color: #038CCA;
    box-shadow: 0 0 0 4px rgba(3, 140, 202, 0.1);
}

.wc-input:hover:not(:focus) {
    border-color: #cbd5e1;
}

.wc-input.wc-input-error {
    border-color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.wc-textarea {
    resize: vertical;
    min-height: 100px;
}

.wc-field-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

/* Custom checkbox */
.wc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    cursor: pointer;
    color: #475569;
}

.wc-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.wc-checkbox-label input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #038CCA 0%, #0277a8 100%);
    border-color: #038CCA;
}

.wc-checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.wc-checkbox-with-tooltip {
    position: relative;
}

.wc-tooltip {
    cursor: help;
    position: relative;
}

.wc-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.4;
    max-width: 220px;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.wc-tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.wc-tooltip:hover::after,
.wc-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

.wc-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.wc-btn-primary,
.wc-btn-secondary {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wc-btn-primary {
    background: linear-gradient(135deg, #038CCA 0%, #0277a8 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(3, 140, 202, 0.25);
}

.wc-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(3, 140, 202, 0.35);
}

.wc-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wc-btn-secondary {
    background: #fff;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.wc-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

/* ==== LOADING SPINNER ==== */
.btn-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==== TYP DOKUMENTU ==== */
.wc-document-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    align-items: stretch;
}

.wc-document-option {
    position: relative;
    padding: 0;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

.wc-document-option:hover {
    border-color: #038CCA;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(3, 140, 202, 0.12);
}

.wc-document-option.active {
    border-color: #038CCA;
    background: linear-gradient(135deg, #eff9ff 0%, #e0f4ff 100%);
    box-shadow: 0 8px 25px rgba(3, 140, 202, 0.15);
}

.wc-document-option.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #038CCA 0%, #0277a8 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(3, 140, 202, 0.3);
}

.wc-document-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.wc-doc-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wc-doc-icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.wc-doc-label {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

/* ==== POWIADOMIENIA ==== */
.wc-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 999999;
    opacity: 0;
    transform: translateX(120px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}

.wc-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.wc-notification-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.wc-notification-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.wc-success-notification {
    padding: 14px 20px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: none;
    border-radius: 10px;
    color: #166534;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.wc-success-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==== WALIDACJA - STYLE BŁĘDÓW ==== */
.wc-field-error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}

/* ==== LICZNIK ZNAKÓW ==== */
.wc-char-counter {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
}

#char-count {
    font-weight: 700;
    color: #038CCA;
}

/* ==== RESPONSYWNOŚĆ ==== */
@media (max-width: 768px) {
    .wc-shipping-section,
    .wc-document-type-selector,
    .wc-invoice-section,
    .wc-order-notes-section {
        padding: 20px 16px;
        border-radius: 14px;
    }
    
    .wc-section-title {
        font-size: 15px;
        margin-bottom: 18px;
    }
    
    .wc-document-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .wc-document-option {
        height: 90px;
    }
    
    .wc-doc-icon {
        font-size: 32px;
    }
    
    .wc-form-grid {
        grid-template-columns: 1fr;
    }
    
    .wc-form-field.wc-full-width {
        grid-column: span 1;
    }
    
    .wc-address-form,
    .wc-invoice-form {
        padding: 20px 16px;
    }
    
    .wc-address-card,
    .wc-invoice-card {
        flex-direction: column;
        padding: 16px;
    }
    
    .wc-address-card input[type="radio"],
    .wc-invoice-card input[type="radio"] {
        position: absolute;
        top: 16px;
        right: 16px;
        margin: 0;
    }
    
    .wc-address-content,
    .wc-invoice-content {
        width: 100%;
        padding-right: 45px;
    }
    
    .wc-address-actions,
    .wc-invoice-actions {
        margin-left: 0;
        margin-top: 14px;
        width: 100%;
    }
    
    .wc-address-edit,
    .wc-address-delete,
    .wc-invoice-edit,
    .wc-invoice-delete {
        flex: 1;
        text-align: center;
        padding: 12px 14px;
    }
    
    .wc-form-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .wc-btn-primary,
    .wc-btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }
    
    .wc-restore-cart-content {
        margin: 20px;
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    .wc-restore-icon {
        font-size: 52px;
    }
    
    .wc-restore-cart-content h3 {
        font-size: 20px;
    }
    
    .wc-restore-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .wc-btn-restore,
    .wc-btn-dismiss {
        width: 100%;
    }
    
    .wc-notification {
        top: 12px;
        right: 12px;
        left: 12px;
        transform: translateY(-120px);
    }
    
    .wc-notification.show {
        transform: translateY(0);
    }
    
    .wc-input, .wc-textarea {
        font-size: 16px !important;
        padding: 16px;
    }
    
    .wc-tooltip::after {
        left: auto;
        right: 0;
        transform: none;
        max-width: 200px;
    }
    
    .wc-tooltip::before {
        left: auto;
        right: 20px;
        transform: none;
    }
}

@media (max-width: 480px) {
    .share-cart-button {
        padding: 12px 20px;
        font-size: 13px;
        width: 100%;
    }
    
    .wc-address-actions,
    .wc-invoice-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .wc-address-actions button,
    .wc-invoice-actions button {
        width: 100%;
    }
    
    .wc-add-address-btn,
    .wc-add-invoice-btn {
        padding: 16px;
        font-size: 13px;
    }
}

/* ========== UKRYJ DOMYŚLNE WooCommerce CHECKOUT ========== */
.woocommerce-checkout .col2-set {
    display: none !important;
}

.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields,
.woocommerce-checkout .woocommerce-additional-fields {
    display: none !important;
}

.woocommerce-checkout .ct-customer-details {
    display: block !important;
}

/* ==== ANIMACJE MIKRO-INTERAKCJI ==== */
@keyframes cardPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

.wc-address-card.active,
.wc-invoice-card.active {
    animation: cardPulse 0.3s ease;
}

/* Smooth focus transitions */
.wc-input,
.wc-btn-primary,
.wc-btn-secondary,
.wc-address-card,
.wc-invoice-card,
.wc-document-option {
    will-change: transform, box-shadow;
}
