/* Style général */
.container {
    margin: auto;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.form-control {
    font-size: 0.8rem;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: all 0.3s ease;
}



.card {
    border-radius: 1rem;
    overflow: hidden;
}

.form-floating > label {
    padding-left: 1rem;
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

.invalid-feedback {
    font-size: 0.875rem;
}

.form-text {
    font-size: 0.75rem;
    color: #6c757d;
}
.form-control:focus + label,
.form-control:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 0.8rem;
    color: #007bff;
}

.form-group label,.form-floating label ,.form-select ,.form-check label,.error_message,.dropdown-item{

    font-size: 0.8rem !important;
}
.form-floating > .btn {
    z-index: 2;
}




.dropdown-container {
    position: absolute;
    z-index: 10;
    width:100%;
}

.dropdown-menu {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    background-color: white;
    width: inherit!important;

}

/************************ For popup ************************/

/* static/src/css/portal_popup.css */

/* Import the balloon radio styles */
@import url('https://fonts.googleapis.com/css?family=Raleway:300,400');

/* Popup overlay styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.popup-header {
    text-align: center;
    margin-bottom: 2rem;
    font-family: 'Raleway', sans-serif;
}

.popup-header h3 {
    color: #333;
    margin: 0;
    font-weight: 400;
}

.popup-body {
    position: relative;
    min-height: 150px;
}

.popup-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Balloon radio button styles (from your provided CSS) */
:root {
    --clr--white: white;
    --clr--black: black;
    --clr--silver: silver;
    --clr--highlight: magenta;
    --clr--gray-light: whitesmoke;
    --clr--gray-mid: gainsboro;
    --clr--gray-dark: darkgray;
    --hover-shadow--gray: var(--clr--gray-mid);
    --def--anim-dur: 250ms;
    --def--anim-trans: ease-in-out;
}

#r8-balloon-radio-group-wrapper {
    margin: 4rem auto;
    width: 32rem;
    display: block;
    padding: 0rem 1rem;
    position: relative;
    text-align: center;
}

#r8-balloon-radio-group-wrapper :disabled + label {
    color: var(--clr--gray-dark);
}

#r8-balloon-radio-group-wrapper label {
    display: block;
    transform: rotateZ(-45deg);
    font-weight: 300;
    position: absolute;
    left: 50%;
    text-align: center;
    width: 100%;
    font-size: 0.5rem;
    letter-spacing: 0.025rem;
    margin-left: calc(50% - 25%);
    font-family: 'Raleway', sans-serif;
}

#r8-balloon-radio-group-wrapper label::after {
    display: block;
    content: attr(for);
}

.r8-radio-float:not([disabled]):hover {
    background: var(--clr--gray-light);
    box-shadow: 0 0 0.25rem var(--clr--white);
    animation: stabilize 1 1s;
}

.r8-radio-float:not([disabled]):hover:checked {
    box-shadow: none;
    animation: unset !important;
}

.r8-radio-float:not([disabled]):hover::before {
    border: 0.125rem solid var(--clr--highlight);
}

.r8-radio-float:not([disabled]):hover::after {
    opacity: 0.45;
}

#r8-balloon-radio-group-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#r8-balloon-radio-group-wrapper ul li {
    display: inline-block;
    transform: rotateZ(45deg);
}

.radio {
    position: relative;
    width: 2rem;
    height: 2rem;
    margin: 0.67rem;
    margin-top: 0;
    cursor: pointer;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transform-origin: center;
    border: 0.05rem solid var(--clr--gray-dark);
    border-radius: 50% 50% 0.2rem 50%;
    background: var(--clr--gray-mid);
    transition: all var(--def--anim-dur) var(--def--anim-trans);
}

.radio::before,
.radio::after {
    position: absolute;
    content: '';
    border-radius: 50%;
}

.radio::before {
    top: 0.25rem;
    left: 0.25rem;
    width: 1rem;
    height: 1rem;
    background: var(--clr--white);
    border: 0.125rem solid var(--clr--gray-mid);
    box-shadow: 0 0 0.05rem rgba(0, 0, 0, 0.25);
    pointer-events: all;
    transition: all var(--def--anim-dur) var(--def--anim-trans);
}

.radio::after {
    width: 2rem;
    height: 0.67rem;
    top: 2.19rem;
    left: 1.5rem;
    background: var(--hover-shadow--gray);
    opacity: 0.25;
    transform-origin: right middle;
    transform: rotateZ(-45deg);
    overflow: visible;
    background: radial-gradient(ellipse at center, var(--hover-shadow--gray) 0%, transparent 50%);
    transition: height 1s ease, opacity 1s ease;
}

.radio:checked {
    background: var(--clr--gray-light);
    transform: scale(1.2);
    transition: background var(--def--anim-dur) var(--def--anim-trans);
}

.radio:checked::before {
    width: 0.75rem;
    height: 0.75rem;
    background: var(--clr--highlight);
    border: 0.25rem solid rgba(255, 255, 255, 0.5);
}

.radio:checked:disabled {
    opacity: 0.40;
    background: var(--clr--gray-light);
}

.radio:disabled {
    cursor: no-drop;
    opacity: 0.25;
    background: var(--clr--silver);
    animation: unset !important;
}

#r8-logo-coin {
    position: absolute;
    width: 3.5rem;
    height: 3.5rem;
    margin: 1rem;
    right: 1rem;
    bottom: 1rem;
    background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/1251/R8-launcher-icon-light.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: 0 0;
}

#r8-logo-coin::before {
    position: relative;
    border-radius: 50%;
    display: block;
    content: '';
    background-size: contain;
    background: var(--clr--highlight);
    margin: 0.5rem;
    width: calc(90% - 0.6rem);
    height: calc(90% - 0.6rem);
    z-index: -1;
}

@keyframes stabilize {
    0% { transform: scale(0.8); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Button styles */
#save-preference-btn {
    background-color: var(--clr--highlight);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    transition: all 0.3s ease;
}

#save-preference-btn:hover:not(:disabled) {
    background-color: #d000d0;
    transform: translateY(-2px);
}

#save-preference-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        padding: 1rem;
    }

    #r8-balloon-radio-group-wrapper {
        width: 100%;
        margin: 2rem auto;
    }
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.form-control.is-invalid {
    border-color: #dc3545 !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}
.form-floating > label.search_arrondissement {
  margin-left: 2.5rem!important;
}
.search_arrondissement:focus + label,
.search_arrondissement:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 0.8rem;
    color: #007bff;
    margin-left: initial!important;
}
/* Dropdown Container Styles */
/* Dropdown Container Styles */
.dropdown-container {
    position: relative;
    width: 100%;
    margin-top: -10px;
    z-index: 1000;
}

.dropdown-container.d-none {
    display: none !important;
}

/* Dropdown Menu Styles */
#arrondissement_list {
    display: block !important;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 0;
    margin: 0;
}

/* Dropdown Item Styles */
#arrondissement_list option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    color: #212529;
    background-color: #fff;
}

#arrondissement_list option:last-child {
    border-bottom: none;
}

#arrondissement_list option:hover,
#arrondissement_list option.active {
    background-color: #0d6efd;
    color: #fff;
}

#arrondissement_list option:focus {
    outline: none;
    background-color: #0d6efd;
    color: #fff;
}

/* Search Input Warning State */
.form-control.border-warning {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.form-control.border-warning:focus {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

/* Invalid Feedback Styles */
#arrondissement-error {
    display: none !important;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

#arrondissement-error[style*="display: block"] {
    display: block !important;
}

/* Combined Label Readonly Appearance */
#combinedLabel {
    background-color: #e9ecef !important;
    opacity: 1;
    pointer-events: none;
    user-select: none;
}

/* Custom Scrollbar for Dropdown */
#arrondissement_list::-webkit-scrollbar {
    width: 8px;
}

#arrondissement_list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0.375rem;
}

#arrondissement_list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 0.375rem;
}

#arrondissement_list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    #arrondissement_list {
        max-height: 200px;
    }

    #arrondissement_list option {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Animation for dropdown appearance */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-container:not(.d-none) {
    animation: slideDown 0.2s ease-out;
}

/* Input Group Focus State */
.input-group:focus-within .input-group-text {
    border-color: #86b7fe;
    background-color: #e7f1ff;
}

.input-group:focus-within .input-group-text i {
    color: #0d6efd;
}