/* ESTILOS BASE */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
}

header {
    background-color: #0077cc;
    color: white;
    padding: 1rem;
    text-align: center;
}

nav {
    background-color: #005fa3;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    font-size: 1rem;
}

nav a:hover {
    color: #ffdd57;
}

.main-content {
    padding: 2rem 1rem;
    text-align: center;
}

.main-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.grid-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.option-tile {
    background-color: cyan;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    font-size: 1rem;
}

.option-tile:hover {
    transform: scale(1.05);
    background-color: skyblue;
}

.recharge-options {
    display: none;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.recharge-options::-webkit-scrollbar {
    width: 8px;
}

.recharge-options::-webkit-scrollbar-thumb {
    background-color: #0077cc;
    border-radius: 8px;
}

.recharge-tile h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #0077cc;
}

.recharge-tile p {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    color: #333;
}

/* MODAL */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 1rem;
}

.modal-content {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.modal-content input {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.company-list {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
}

.company-list::-webkit-scrollbar {
    display: none;
}

.company-item {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    background-color: #e6e6e6;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.company-item:hover,
.company-item.selected {
    background-color: #0077cc;
    color: white;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-buttons button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    max-width: 150px;
}

.confirm-btn {
    background-color: #0077cc;
    color: white;
}

.cancel-btn {
    background-color: #ccc;
}

.Tienda {
    text-align: center;
}

.Texto {
    color: blue;
}

/* MEDIA QUERIES PARA DISPOSITIVOS */

@media screen and (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: center;
    }

    .main-content {
        padding: 1rem;
    }

    .option-tile {
        font-size: 0.95rem;
        padding: 0.75rem;
    }

    .modal-content {
        padding: 1rem;
    }
}

@media screen and (max-width: 480px) {
    nav a {
        font-size: 0.9rem;
    }

    .option-tile {
        font-size: 0.9rem;
    }

    .modal-buttons {
        flex-direction: column;
        align-items: center;
    }

    .modal-buttons button {
        max-width: none;
        width: 100%;
    }
}
