/* Custom Checkout Popup Styles - Tema oscuro similar a releasit cod form */

/* Overlay */
.ccp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 999998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ccp-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Popup Container - Tema oscuro */
.ccp-popup {
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 999999;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    margin: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ccp-overlay.active .ccp-popup {
    transform: scale(1);
}

/* Close Button - Tema oscuro */
.ccp-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
}

.ccp-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.ccp-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Popup Content */
.ccp-content {
    padding: 32px;
    width: 100%;
    box-sizing: border-box;
}

/* Product Image Section */
.ccp-product-image {
    width: 100%;
    max-width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto 24px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Product Info - Tema oscuro */
.ccp-product-info {
    text-align: center;
    margin-bottom: 32px;
}

.ccp-product-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.ccp-product-price {
    font-size: 28px;
    font-weight: 700;
    color: #B0E64B;
    margin-bottom: 4px;
}

.ccp-product-price .currency {
    font-size: 20px;
    margin-right: 4px;
}

/* Summary Section - Tema oscuro */
.ccp-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ccp-summary-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ccp-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ccp-summary-item:last-child {
    border-bottom: none;
}

.ccp-summary-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.ccp-summary-value {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.ccp-summary-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #B0E64B;
}

.ccp-summary-total .ccp-summary-label {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.ccp-summary-total .ccp-summary-value {
    font-size: 24px;
    color: #B0E64B;
}

/* Form Section - Tema oscuro */
.ccp-form {
    margin-top: 24px;
    width: 100%;
    box-sizing: border-box;
}

.ccp-form-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
    text-align: center;
    width: 100%;
}

.ccp-form-group {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    display: block;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}

.ccp-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    width: 100%;
}

.ccp-form-label .required {
    color: #ef4444;
    margin-left: 4px;
}

/* Campos de formulario - Tema oscuro con ancho completo */
.ccp-form-input,
.ccp-form-textarea,
.ccp-form-input select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box !important;
    background-color: #282828;
    color: #ffffff;
    display: block;
    margin: 0;
    min-width: 0;
}

/* Estilos específicos para select */
.ccp-form-input[type="text"][readonly] {
    background-color: #333 !important;
    cursor: not-allowed;
    opacity: 0.8;
}

.ccp-form-input select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.ccp-form-input select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #1f1f1f;
}

.ccp-form-input select option {
    background-color: #282828;
    color: #ffffff;
    padding: 10px;
}

.ccp-form-input::placeholder,
.ccp-form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.ccp-form-input:focus,
.ccp-form-textarea:focus {
    outline: none;
    border-color: #B0E64B;
    box-shadow: 0 0 0 3px rgba(176, 230, 75, 0.1);
    background-color: #2a2a2a;
}

.ccp-form-input.error,
.ccp-form-textarea.error {
    border-color: #ef4444;
}

.ccp-form-textarea {
    min-height: 100px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

.ccp-form-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    display: none;
    width: 100%;
}

.ccp-form-error.show {
    display: block;
}

/* Submit Button - Verde lima como en el tema */
.ccp-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: #B0E64B;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(176, 230, 75, 0.3);
    box-sizing: border-box;
    display: block;
}

.ccp-submit-btn:hover {
    background: #9dd13a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(176, 230, 75, 0.4);
}

.ccp-submit-btn:active {
    transform: translateY(0);
}

.ccp-submit-btn:disabled {
    background: #666666;
    color: #999999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ccp-submit-btn.loading {
    position: relative;
    color: transparent;
}

.ccp-submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #1a1a1a;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* Success Message */
.ccp-success-message {
    background: #10b981;
    color: #ffffff;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 16px;
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.ccp-success-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .ccp-popup {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .ccp-content {
        padding: 24px 20px;
    }
    
    .ccp-product-title {
        font-size: 20px;
    }
    
    .ccp-product-price {
        font-size: 24px;
    }
    
    .ccp-form-title {
        font-size: 18px;
    }
    
    .ccp-form-input,
    .ccp-form-textarea {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Scrollbar styling for popup - Tema oscuro */
.ccp-popup::-webkit-scrollbar {
    width: 8px;
}

.ccp-popup::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

.ccp-popup::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.ccp-popup::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
