/* Auto-Gestión de Cambios - Estilos Públicos */

.agc-exchange-form-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.agc-form-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

/* Mensajes */
#agc-messages {
    margin-bottom: 20px;
}

.agc-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

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

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

.agc-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Steps */
.agc-step {
    display: none;
}

.agc-step-active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.agc-step h3 {
    color: #0073aa;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

/* Formularios */
.agc-form-group {
    margin-bottom: 20px;
}

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

.agc-form-group input[type="text"],
.agc-form-group input[type="email"],
.agc-form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.agc-form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

/* Botones */
.agc-button {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    margin-right: 10px;
}

.agc-button-primary {
    background: #0073aa;
    color: white;
}

.agc-button-primary:hover {
    background: #005a87;
}

.agc-button-secondary {
    background: #f0f0f0;
    color: #333;
}

.agc-button-secondary:hover {
    background: #e0e0e0;
}

.agc-button-small {
    padding: 8px 16px;
    font-size: 14px;
}

.agc-button-large {
    padding: 16px 32px;
    font-size: 18px;
    font-weight: bold;
}

/* Info boxes */
.agc-info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 25px;
    border-left: 4px solid #0073aa;
}

.agc-order-details h4 {
    margin-top: 0;
    color: #0073aa;
}

/* Productos */
.agc-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.agc-product-item {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.agc-product-item:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0,115,170,0.15);
}

.agc-product-item img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.agc-product-item h4 {
    font-size: 16px;
    margin: 10px 0;
    color: #333;
}

.agc-price {
    color: #0073aa;
    font-weight: bold;
    font-size: 18px;
    margin: 10px 0;
}

/* Variaciones */
.agc-variations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.agc-variation-item {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.agc-variation-item:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0,115,170,0.15);
}

.agc-variation-item h4 {
    font-size: 14px;
    margin: 0 0 10px 0;
    color: #333;
}

/* Costos */
.agc-cost-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.agc-cost-details h4 {
    margin-top: 0;
    color: #333;
    margin-bottom: 20px;
}

.agc-cost-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.agc-cost-row:last-child {
    border-bottom: none;
}

.agc-cost-total {
    font-size: 20px;
    color: #0073aa;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #0073aa;
}

.agc-cost-positive {
    color: #d63638;
}

.agc-cost-negative {
    color: #00a32a;
}

/* Success box */
.agc-success-box {
    background: #d4edda;
    border: 2px solid #00a32a;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
}

.agc-success-box p {
    font-size: 16px;
    margin-bottom: 15px;
}

.agc-payment-link-box {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 5px;
}

.agc-payment-button {
    display: inline-block;
    background: #00a32a;
    color: white;
    padding: 16px 40px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
}

.agc-payment-button:hover {
    background: #008a20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,163,42,0.3);
}

/* Loader */
.agc-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.agc-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

.agc-loader p {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .agc-exchange-form-wrapper {
        padding: 20px;
        margin: 20px 10px;
    }

    .agc-products-grid,
    .agc-variations-grid {
        grid-template-columns: 1fr;
    }

    .agc-cost-row {
        font-size: 14px;
    }

    .agc-button {
        width: 100%;
        margin-bottom: 10px;
    }
}
