.predefined-carts-list {
    margin-top: 20px;
}

.predefined-cart-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.predefined-cart-item p {
    margin: 8px 0;
}

.predefined-cart-item input[type="text"] {
    width: 70%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.predefined-cart-item .button {
    margin-right: 10px;
}

#cart-title {
    width: 300px;
    margin-right: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.toggle-products, .toggle-modal-products {
    background: #0073aa;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.toggle-products:hover, .toggle-modal-products:hover {
    background: #005a87;
}

.cart-products, .modal-cart-products {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.cart-products ul, .modal-cart-products ul {
    margin: 0;
    padding-left: 20px;
}

.cart-products li, .modal-cart-products li {
    margin: 5px 0;
    padding: 3px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-products li:last-child, .modal-cart-products li:last-child {
    border-bottom: none;
}

.edit-title-icon {
    cursor: pointer;
    margin-left: 8px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 14px;
    opacity: 0.6;
    transition: all 0.2s ease;
    display: inline-block;
    vertical-align: middle;
}

.edit-title-icon:hover {
    opacity: 1;
    background-color: rgba(0, 115, 170, 0.1);
    transform: scale(1.1);
}

/* Nowe style dla sekcji tworzenia koszyka */
.wpo-predefined-cart-section {
    text-align: center;
}

.wpo-separator-line {
    font-size: 16px;
    color: #6c757d;
    margin: 15px 0;
    font-weight: 500;
}

.wpo-cart-creation-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.wpo-cart-creation-form #cart-title {
    width: 300px;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    background-color: white;
}

.wpo-cart-creation-form #cart-title:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.wpo-create-cart-btn {
    background-color: #0073aa !important;
    color: white !important;
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    transition: all 0.2s ease;
    min-width: 220px;
    position: relative;
}

.wpo-create-cart-btn:hover:not(.loading) {
    background-color: #005a87 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wpo-help-text {
    font-size: 12px;
    color: #6c757d;
    margin: 10px 0 0 0;
    font-style: italic;
    text-align: left;
}

/* Loader styles */
.wpo-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid white;
    animation: wpo-spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes wpo-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wpo-spinner-dark {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid #0073aa;
}

/* Loading states for buttons */
.button.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    opacity: 0.7;
}

.button.loading:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid white;
    animation: wpo-spin 1s linear infinite;
}

.button-secondary.loading:before {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid #666;
}

.wpo-create-cart-btn.loading {
    color: transparent !important;
    pointer-events: none;
    opacity: 0.8;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.wpo-create-cart-btn.loading:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid white;
    animation: wpo-spin 1s linear infinite;
}

/* Modal overlay loader */
.wpo-modal-overlay-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.wpo-modal-overlay-loader .wpo-spinner {
    width: 24px;
    height: 24px;
    border-width: 3px;
    border-color: rgba(0, 115, 170, 0.2);
    border-top-color: #0073aa;
    margin-right: 0;
}

/* Loading text animation */
.wpo-loading-text {
    display: inline-block;
    animation: wpo-pulse 1.5s ease-in-out infinite;
}

@keyframes wpo-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Responsive design */
@media (max-width: 768px) {
    .wpo-cart-creation-form {
        flex-direction: column;
        align-items: stretch;
    }

    .wpo-cart-creation-form #cart-title {
        width: 100%;
        margin-bottom: 10px;
    }

    .wpo-create-cart-btn {
        width: 100%;
    }
}

.wpo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpo-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.wpo-modal-content h3 {
    margin-top: 0;
    color: #333;
}

.wpo-modal-content input[type="text"] {
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wpo-modal-content #edit-title-input {
    width: 100%;
    margin: 15px 0;
    padding: 12px;
    border: 2px solid #0073aa;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.wpo-modal-content #edit-title-input:focus {
    outline: none;
    border-color: #005a87;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.wpo-modal-content .button {
    margin: 5px;
    padding: 10px 20px;
}

.wpo-replacement-modal {
    max-width: 700px;
    text-align: left;
}

.wpo-cart-preview-modal {
    max-width: 600px;
    text-align: left;
}

.wpo-cart-preview-modal h3 {
    text-align: center;
    color: #0073aa;
    margin-bottom: 20px;
}

.wpo-cart-preview-modal p {
    margin: 15px 0;
    font-size: 16px;
    color: #333;
}

.wpo-cart-preview-modal .modal-cart-products {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.wpo-cart-preview-modal .modal-cart-products ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpo-cart-preview-modal .modal-cart-products li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #495057;
}

.wpo-cart-preview-modal .modal-cart-products li:last-child {
    border-bottom: none;
}

.wpo-cart-preview-modal .button {
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.wpo-cart-preview-modal .button-primary {
    background: #0073aa;
    color: white;
    border: none;
}

.wpo-cart-preview-modal .button-primary:hover {
    background: #005a87;
}

.wpo-cart-preview-modal .button:not(.button-primary) {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ccc;
}

.wpo-cart-preview-modal .button:not(.button-primary):hover {
    background: #e1e1e1;
}

.wpo-cart-option {
    border: 1px solid #ddd;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    background-color: #f8f8f8;
}

.wpo-cart-option p {
    margin: 5px 0;
}

#create-predefined-cart {
    background-color: #0073aa;
    color: white;
    padding: 12px 10px !important;
    margin: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#create-predefined-cart:hover {
    background-color: #005a87;
}

.wc-proceed-to-checkout{
    display: flex;
    flex-direction: column-reverse;
}

/* ==============================================
   NOWE STYLE DLA POPUP INFORMACYJNEGO
   ============================================== */

.wpo-info-modal {
    max-width: 600px;
    text-align: left;
}

.wpo-info-modal h3 {
    text-align: center;
    color: #0073aa;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

.wpo-info-modal h4 {
    color: #0073aa;
    margin: 20px 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.wpo-info-text {
    line-height: 1.6;
    color: #333;
}

.wpo-info-text p {
    margin: 0 0 20px 0;
    font-size: 15px;
    text-align: justify;
}

.wpo-info-text ul {
    margin: 0 0 20px 20px;
    padding: 0;
}

.wpo-info-text li {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.wpo-info-text strong {
    color: #0073aa;
    font-weight: 600;
}

/* Responsive dla info modal */
@media (max-width: 768px) {
    .wpo-info-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .wpo-info-modal h3 {
        font-size: 20px;
    }
    
    .wpo-info-text p {
        text-align: left;
        font-size: 14px;
    }
}

/* ==============================================
   SEKCJA INFORMACYJNA W ZAKŁADCE CARRELLI PREDEFINITI
   ============================================== */

.wpo-info-section {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    line-height: 1.6;
    color: #333;
}

.wpo-info-section p {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.wpo-info-section p:last-child {
    margin-bottom: 0;
}

.wpo-info-section strong {
    color: #0073aa;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.wpo-info-section br {
    margin-bottom: 8px;
}

/* Responsive dla sekcji informacyjnej */
@media (max-width: 768px) {
    .wpo-info-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .wpo-info-section p {
        font-size: 13px;
    }
}
