@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.ccp-container {
    max-width: 350px;
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #eee;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 10px auto;
}

.ccp-input-wrapper {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.ccp-amount {
    border: none !important;
    background: none !important;
    flex: 1;
    font-size: 18px;
    font-weight: bold;
    outline: none !important;
    width: 100%;
    box-shadow: none !important;
}

.ccp-flag, .ccp-currency-list img {
    width: 18px !important;
    height: 13px !important;
    object-fit: cover;
    border-radius: 2px;
}

.ccp-currency-static, .ccp-currency-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 10px;
    border-left: 1px solid #ddd;
    min-width: 85px;
    cursor: pointer;
    user-select: none;
}

.ccp-swap-wrapper {
    display: flex;
    justify-content: center;
    margin: -15px 0;
    position: relative;
    z-index: 10;
}

#ccp-swap-btn {
    background: #fff !important;
    border: 1px solid #eee !important;
    border-radius: 50% !important;
    width: 38px;
    height: 38px;
    cursor: pointer;
    color: #C5BA90;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

/* DROPDOWN LIST */
.ccp-currency-dropdown-wrapper {
    position: relative;
}

.ccp-currency-list {
    position: absolute;
    top: 100%;
    right: 0;
    width: 130px;
    background: #fff !important;
    border: 1px solid #eee !important;
    border-radius: 8px;
    list-style: none !important;
    padding: 5px !important;
    margin: 5px 0 0 0 !important;
    z-index: 99999 !important;
    /* Augmenté pour passer devant tout */
    display: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Classe pour afficher la liste */
.ccp-currency-list.show {
    display: block !important;
}

.ccp-currency-list li {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px !important;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    color: #333 !important;
}

.ccp-currency-list li:hover {
    background: #f1f5f9 !important;
}

.ccp-arrow {
    width: 12px;
    height: 12px;
    fill: #718096;
    margin-left: 5px;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.ccp-currency-dropdown-wrapper.open .ccp-arrow {
    transform: rotate(180deg) !important;
}

#ccp-rate-info {
    text-align: center;
    font-size: 11px;
    color: #aaa;
    margin-top: 10px;
}

/* Empêche le conteneur de couper le menu */
.ccp-input-wrapper {
    position: relative !important;
    overflow: visible !important;
}

.ccp-currency-dropdown-wrapper {
    position: relative !important;
}

.ccp-currency-list {
    position: absolute !important;
    top: 110% !important;
    right: 0 !important;
    width: 130px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    z-index: 999999 !important;
    /* Très important */
    display: none;
    /* jQuery gère l'affichage avec fadeToggle */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    padding: 5px !important;
    margin: 0 !important;
    list-style: none !important;
}

.ccp-currency-list li {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px !important;
    cursor: pointer !important;
    color: #333 !important;
}

.ccp-currency-list li:hover {
    background: #f5f5f5 !important;
}

/* Empêche les éléments enfants de voler le clic au parent */
#ccp-target-selector * {
    pointer-events: none;
}

.ccp-dropdown-container {
    position: relative !important;
}

.ccp-currency-list {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    width: 140px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    z-index: 999999 !important;
    display: none;
    /* Géré par jQuery .show() / .hide() */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
    padding: 5px !important;
    margin-top: 5px !important;
    list-style: none !important;
}

.ccp-currency-list li {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px !important;
    cursor: pointer !important;
    transition: background 0.2s;
}

.ccp-currency-list li:hover {
    background: #f7f7f7 !important;
}

/* Rotation de la flèche quand ouvert */
.ccp-dropdown-container.open .ccp-arrow {
    transform: rotate(180deg);
}