/* Font e colori principali */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
}

header,
footer {
    background-color: #007bff;
    color: white;
    text-align: center;
    padding: 20px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.header-container h1 {
    margin: 0;
    font-size: 2.5rem;
}

.header-container p {
    font-size: 1.2rem;
    margin-top: 10px;
}

.nav-bar {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.nav-bar .btn {
    margin: 0 10px;
    background-color: #007bff;
    color: white;
    border-radius: 25px;
    padding: 10px 20px;
    transition: background-color 0.3s ease;
}

.nav-bar .btn:hover {
    background-color: #0056b3;
}

.content {
    margin: 20px;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    max-width: 800px;
    margin: auto;
}

#profile-section h2 {
    font-weight: 700;
    font-size: 1.8rem;
    color: #007bff;
    margin-bottom: 10px;
}

#profile-section h3 {
    font-weight: 500;
    font-size: 1.5rem;
    margin-top: 20px;
    color: #555;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

#exchange-section h2 {
    font-weight: 700;
    font-size: 1.8rem;
    color: #007bff;
    margin-bottom: 10px;
}

#exchange-section h3 {
    font-weight: 500;
    font-size: 1.5rem;
    margin-top: 20px;
    color: #555;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

#search-input {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

#search-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    border-radius: 5px;
    font-size: 1rem;
    color: #555;
}

.list-group-item-dark {
    font-weight: bold;
    background-color: #f8f9fa;
}

.btn {
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    border: none;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-danger {
    background-color: #dc3545;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107 !important;
    border: none;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-spacing {
    margin-right: 4px;
}

.card-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
}

.card-list-item button {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 5px 10px;
    transition: background-color 0.3s ease;
}

.card-list-item button:hover {
    background-color: #c82333;
}

footer p {
    margin: 0;
}

.form-inline label {
    font-weight: bold;
}

.form-inline .form-control {
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.form-inline button {
    background-color: #28a745;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.form-inline button:hover {
    background-color: #218838;
}

/* Styles for Modal */
.modal-header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 500;
}

.modal-body {
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f7f7f7;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.modal-body .form-group {
    width: 100%;
}

.modal-body input {
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    transition: box-shadow 0.3s ease;
}

.modal-body input:focus {
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.25);
}

.modal-body button {
    width: 100%;
    padding: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: #28a745;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.modal-body button:hover {
    background-color: #218838;
}

#register-message,
#login-message {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 15px;
}

.success {
    color: #28a745;
    font-weight: bold;
}

.error {
    color: #dc3545;
    font-weight: bold;
}

.modal .form-group input {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.modal .btn-primary {
    background-color: #007bff;
    border-radius: 5px;
}

.modal .btn-primary:hover {
    background-color: #0056b3;
}

#logout-button,
#profile-section .btn-primary {
    margin-right: 10px;
}

#add-cards-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#add-cards-form label,
#add-cards-form select,
#add-cards-form button {
    margin-bottom: 10px;
}

#add-cards-form .btn-primary {
    padding: 10px 20px;
    font-weight: bold;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
}

#add-cards-form .btn-primary:hover {
    background-color: #0056b3;
}

#add-cards-form button {
    align-self: flex-start;
}

.btn-success {
    align-self: flex-start;
}

.d-none {
    display: none !important;
}

#exchange-section .section-title {
    font-weight: 700;
    font-size: 2rem;
    color: #007bff;
    /* Colore blu principale */
    margin-bottom: 10px;
}

#exchange-section .section-subtitle {
    font-weight: 500;
    font-size: 1.5rem;
    margin-top: 20px;
    color: #555;
    /* Colore grigio scuro */
    border-bottom: 2px solid #007bff;
    /* Sottolineatura blu */
    padding-bottom: 8px;
}

#exchange-section .list-group {
    margin-bottom: 15px;
    /* Spaziatura tra le liste */
}

#exchange-section .btn-secondary {
    background-color: #6c757d;
    /* Colore grigio per il bottone secondario */
    border: none;
    /* Rimuove il bordo */
}

#exchange-section .btn-secondary:hover {
    background-color: #5a6268;
    /* Colore scuro al passaggio del mouse */
}

/* Stile Select2 */
.select2-container {
    width: 100% !important;
}

.select2-selection {
    border-radius: 25px;
    border: 1px solid #ccc;
    padding: 10px;
    font-size: 16px;
    background-color: #f9f9f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.select2-selection__rendered {
    font-size: 16px;
    color: #333;
}

.select2-container--default .select2-selection--multiple {
    background-color: #f9f9f9;
}

.select2-selection__choice {
    background-color: #007bff;
    color: white;
    border-radius: 15px;
    padding: 2px 8px;
    margin: 3px;
}

/* Hover effect per Select2 */
.select2-selection:focus,
.select2-container--default .select2-selection--multiple:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

/* Stile del bottone Reset */
#reset-filters {
    margin-top: 10px;
    font-size: 14px;
    border-radius: 25px;
    padding: 10px 15px;
    background-color: #6c757d;
    color: white;
    transition: background-color 0.3s ease-in-out;
}

#reset-filters:hover {
    background-color: #5a6268;
}

/* Stile per il testo informativo sopra la select */
#profile-section p {
    margin-bottom: 15px;
    font-size: 14px;
    color: #777;
    text-align: center;
}

/* Ridimensiona l'icona della bandiera */
.flag-icon {
    width: 20px;
    /* Puoi regolare la dimensione come preferisci */
    height: 15px;
    margin-right: 8px;
    /* Distanza tra l'icona e il testo */
    vertical-align: middle;
    /* Allinea l'icona al centro del testo */
}

.img-flag {
    width: 4%;
}

/* Allinea il contenuto del select */
#search-select {
    display: flex;
    align-items: center;
}

#search-select option {
    display: flex;
    align-items: center;
    padding-left: 30px;
    /* Per fare spazio per l'icona */
}

.btn-sm i {
    font-size: 16px;
    /* Riduce la dimensione dell'icona */
    line-height: 1;
    /* Allinea meglio l'icona al bottone */
}

#cards-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* Riduce leggermente la distanza tra le opzioni */
    justify-content: center;
    /* Centra le opzioni */
    padding: 10px;
    border: 1px solid #ddd;
    /* Bordo leggero */
    border-radius: 8px;
    /* Angoli arrotondati */
    background-color: #f9f9f9;
    /* Sfondo leggero */
}

#cards-list .card-checkbox-container {
    width: 60px;
    /* Larghezza ridotta */
    height: 80px;
    /* Altezza ridotta */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    /* Bordo leggero */
    border-radius: 4px;
    /* Angoli arrotondati */
    background-color: #fff;
    /* Sfondo bianco */
    transition: background-color 0.3s ease, transform 0.2s ease;
    gap: 3px;
    /* Spaziatura interna */
}

#cards-list .card-checkbox-container:hover {
    background-color: #e9f7ff;
    /* Colore di hover */
    transform: scale(1.05);
    /* Effetto zoom leggero */
}

#cards-list .form-check-input {
    margin-bottom: 4px;
    /* Spazio tra la checkbox e l'icona */
}

#cards-list .card-icon {
    font-size: 20px;
    /* Icona più piccola */
    color: #007bff;
    /* Colore dell'icona */
    margin-bottom: 3px;
    /* Spazio tra l'icona e il numero */
}

#cards-list span {
    font-size: 14px;
    /* Dimensione del numero leggermente ridotta */
    color: #333;
    /* Colore più scuro per leggibilità */
    font-weight: bold;
    /* Evidenziare il numero */
}