/* Estilos generales del cuerpo */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, #e0c3fc, #8ec5fc);
}

.container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 90%;
    max-width: 400px;
}

h1 {
    text-align: center;
    color: #4a4a4a;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    margin-bottom: 20px;
}

input {
    flex-grow: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

button {
    padding: 10px 15px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#selectButton {
    border-radius: 0 4px 4px 0;
}

#dispenseButton {
    width: 100%;
    border-radius: 4px;
    margin-top: 10px;
}

#productImage {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 10px;
    display: none;
}

#productInfo {
    text-align: center;
    margin-bottom: 20px;
    display: none;
}

#alert {
    background-color: #f44336;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}


/* Estilos del popup */

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

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-content button {
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
}


/* Estilos para el formulario de pago con tarjeta */

form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

form input {
    width: 88%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

form input::placeholder {
    color: #aaa;
}

form input#cardNumber {
    grid-column: 1 / span 2;
    /* Ocupa 2 columnas */
}

form input#email {
    grid-column: 1 / span 2;
    /* Ocupa 2 columnas */
}

form button {
    grid-column: 1 / span 2;
    /* Ocupa 2 columnas */
    padding: 12px;
    background-color: #00bfa5;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

form button:hover {
    background-color: #008f7a;
}


/* Estilo de los íconos de tarjetas */

.card-icons {
    display: flex;
    justify-content: flex-end;
    grid-column: 1 / span 2;
}

.card-icons img {
    height: 25px;
    margin-left: 5px;
}

@media (max-width: 500px) {
    form {
        grid-template-columns: 1fr;
        /* Columna única en pantallas pequeñas */
    }
    form input#cardNumber,
    form input#expiryDate,
    form input#cvv,
    form input#firstName,
    form input#lastName,
    form input#email,
    form button {
        grid-column: 1;
        /* Cada input ocupa todo el ancho */
    }
    .card-icons {
        justify-content: center;
        /* Centramos los íconos en pantallas pequeñas */
    }
}