/* Popup Overlay */
.pps-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Popup Container */
.pps-popup-container {
    background: #fff;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: ppsSlideIn 0.3s ease-out;
}

@keyframes ppsSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Popup Header */
.pps-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
}

.pps-popup-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.pps-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.pps-close-btn:hover {
    color: #333;
}

/* Popup Body */
.pps-popup-body {
    padding: 25px;
}

/* Products Section */
.pps-products-section {
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.pps-products-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.pps-product-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pps-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.pps-product-item:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.pps-product-name {
    flex: 1;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    padding-right: 15px;
    line-height: 1.4;
}

.pps-remove-product {
    flex-shrink: 0;
    background: #ff4444;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    transition: all 0.2s ease;
    font-weight: bold;
    padding: 0;
    margin-left: auto;
}

.pps-remove-product:hover {
    background: #cc0000;
    transform: scale(1.1);
}

.pps-remove-product:active {
    transform: scale(0.95);
}

.pps-empty {
    color: #999;
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: white;
    border-radius: 8px;
    border: 2px dashed #ddd;
}


/* Form Groups */
.pps-form-group {
    margin-bottom: 20px;
}

.pps-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.pps-form-group .required {
    color: #ff4444;
}

.pps-form-group input,
.pps-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.pps-form-group input:focus,
.pps-form-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Form Actions */
.pps-form-actions {
    margin-top: 25px;
}

.pps-submit-btn {
    width: 100%;
    padding: 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.pps-submit-btn:hover {
    background: #45a049;
}

.pps-submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.pps-btn-icon {
    margin-right: 5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pps-popup-container {
        max-width: 95%;
        margin: 10px;
    }
    
    .pps-popup-header {
        padding: 15px 20px;
    }
    
    .pps-popup-header h2 {
        font-size: 20px;
    }
    
    .pps-popup-body {
        padding: 20px;
    }
    
    .pps-product-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pps-popup-overlay {
        padding: 10px;
    }
    
    .pps-popup-header h2 {
        font-size: 18px;
    }
    
    .pps-form-group input,
    .pps-form-group select {
        font-size: 14px;
    }
}


/* Success Modal */
.pps-success-modal {
    text-align: center;
    padding: 40px 20px;
}

.pps-success-icon {
    width: 80px;
    height: 80px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    animation: ppsCheckmark 0.5s ease-in-out;
}

@keyframes ppsCheckmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.pps-success-content h2 {
    color: #4CAF50;
    margin-bottom: 15px;
}

.pps-success-content p {
    color: #666;
    margin-bottom: 10px;
}

.pps-submission-id {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
}

.pps-success-note {
    color: #999;
    font-size: 14px;
    font-style: italic;
}

/* Channel sent status in success modal */
.pps-channel-sent {
    font-size: 13px;
    color: #2e7d32;
    margin: 5px 0;
}

/* Message Alerts */
.pps-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    animation: ppsSlideDown 0.3s;
}

@keyframes ppsSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pps-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pps-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.pps-message-icon {
    font-size: 24px;
    margin-right: 10px;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Phone number field note */
.pps-field-note {
    font-size: 12px;
    color: #999;
    margin: 5px 0 0 0;
    font-style: italic;
}

/* Phone code display in label */
.pps-phone-code {
    font-size: 13px;
    color: #4CAF50 !important;
    font-weight: 600 !important;
    margin-left: 5px;
}

/* Product widget hiding - backup styles */
.pps-hide-price .woocommerce ul.products li.product .price {
    display: none !important;
}

.pps-hide-buttons .woocommerce-loop-product__buttons,
.pps-hide-buttons .add_to_cart_button,
.pps-hide-buttons .product_type_variable {
    display: none !important;
}
