/* WooCommerce Cuotas Paraguay - Frontend Styles */

.wc-cuotas-container {
    background: #FF6B35;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
    transition: all 0.3s ease;
}

.wc-cuotas-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.wc-cuotas-content {
    max-width: 100%;
}

.wc-cuotas-title {
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-align: left;
}

.wc-cuotas-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.wc-cuotas-payment-options {
    flex: 2;
    min-width: 200px;
}

.wc-cuotas-quantity {
    flex: 1;
    min-width: 120px;
}

.wc-cuotas-form label {
    display: block;
    color: #FFFFFF;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.wc-cuotas-select,
.wc-cuotas-quantity-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.wc-cuotas-select:hover,
.wc-cuotas-quantity-input:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: #FFFFFF;
}

.wc-cuotas-select:focus,
.wc-cuotas-quantity-input:focus {
    outline: none;
    border-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    background: #FFFFFF;
}

.wc-cuotas-button {
    background: transparent;
    border: 2px solid #FFFFFF;
    color: #FFFFFF;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.wc-cuotas-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    transform: translateX(-100%);
    transition: all 0.3s ease;
    z-index: -1;
}

.wc-cuotas-button:hover {
    color: #FF6B35;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.wc-cuotas-button:hover:before {
    transform: translateX(0);
}

.wc-cuotas-arrow {
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.wc-cuotas-button:hover .wc-cuotas-arrow {
    transform: translateX(4px);
}

/* Modal Styles */
.wc-cuotas-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wc-cuotas-modal.show {
    opacity: 1;
    visibility: visible;
}

.wc-cuotas-modal-content {
    background: linear-gradient(145deg, #FFFFFF, #F8F9FA);
    margin: 3% auto;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-50px);
    transition: all 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.wc-cuotas-modal.show .wc-cuotas-modal-content {
    transform: translateY(0);
}

.wc-cuotas-modal-close {
    color: #999;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.wc-cuotas-modal-close:hover {
    color: #FF6B35;
}

.wc-cuotas-modal h2 {
    color: #333;
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 700;
}

.wc-cuotas-form-group {
    margin-bottom: 20px;
}

.wc-cuotas-form-row {
    display: flex;
    gap: 20px;
}

.wc-cuotas-form-row .wc-cuotas-form-group {
    flex: 1;
}

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

.wc-cuotas-form-group input,
.wc-cuotas-form-group textarea {
    width: 100%;
    padding: 16px 20px;  /* Aumentado de 12px 16px */
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 15px;     /* Aumentado de 14px */
    line-height: 1.5;    /* Añadido para mejor espaciado */
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-height: 52px;    /* Nuevo - asegura altura mínima */
}

.wc-cuotas-form-group input:focus,
.wc-cuotas-form-group textarea:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.wc-cuotas-form-group input[readonly] {
    background-color: #F5F5F5;
    color: #666;
}

.wc-cuotas-form-group textarea {
    resize: vertical;
    min-height: 100px;   /* Aumentado de 80px */
    padding-top: 14px;   /* Ajuste específico para textarea */
}

.wc-cuotas-form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
}

.wc-cuotas-form-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#wc-cuotas-cancel {
    background: linear-gradient(145deg, #F5F5F5, #E0E0E0);
    color: #666;
    border: none;
}

#wc-cuotas-cancel:hover {
    background: linear-gradient(145deg, #E0E0E0, #D0D0D0);
    transform: translateY(-1px);
}

#wc-cuotas-submit {
    background: linear-gradient(145deg, #FF6B35, #FF8557);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.2);
}

#wc-cuotas-submit:hover {
    background: linear-gradient(145deg, #FF8557, #FF6B35);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

#wc-cuotas-submit:disabled {
    background: #CCC;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.wc-cuotas-loading #wc-cuotas-submit {
    background: #CCC;
    cursor: wait;
}

/* Success/Error Messages */
.wc-cuotas-message {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.wc-cuotas-message.success {
    background: linear-gradient(145deg, #D4EDDA, #C3E6CB);
    color: #155724;
    border: none;
}

.wc-cuotas-message.error {
    background: linear-gradient(145deg, #F8D7DA, #F5C6CB);
    color: #721C24;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-cuotas-container {
        padding: 16px;
        margin: 16px 0;
    }
    
    .wc-cuotas-form {
        flex-direction: column;
        gap: 16px;
    }
    
    .wc-cuotas-payment-options,
    .wc-cuotas-quantity {
        min-width: 100%;
    }
    
    .wc-cuotas-button {
        width: 100%;
        justify-content: center;
        padding: 16px;
    }
    
    .wc-cuotas-modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .wc-cuotas-form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .wc-cuotas-form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .wc-cuotas-form-actions button {
        width: 100%;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .wc-cuotas-title {
        font-size: 18px;
    }
    
    .wc-cuotas-modal h2 {
        font-size: 20px;
    }
    
    .wc-cuotas-modal-content {
        padding: 16px;
        max-height: 85vh;
    }
}