.country-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;  /* Ensure full width */
}

.country-select-flag {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: auto;
    pointer-events: none;
}

.country-select-wrapper select {
    width: 100%;
    padding-right: 40px;  /* Make space for the flag */
    appearance: none;  /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position-x: calc(100% - 25px);
    background-position-y: 50%;
}

.navbar-custom .form-control {
    border: none;
}

.navbar-custom .form-control {
    background-color: rgba(236, 240, 241, 0.1);
    color: #ecf0f1;
}

.navbar-custom .form-control::placeholder {
    color: rgba(236, 240, 241, 0.7);
}
.navbar-custom .form-control:focus {
    background-color: rgba(236, 240, 241, 0.2);
    color: #ecf0f1;
}

.navbar-custom .form-control:focus::placeholder {
    color: rgb(236, 240, 241);
}

.footer-custom {
    background: linear-gradient(to right, #2c3e50, #3498db);
    color: #ecf0f1;
}

.footer-custom a {
    transition: color 0.3s ease;
}

.footer-custom a:hover {
    color: #bdc3c7 !important;
    text-decoration: none;
}

.footer-custom h5 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-custom .fab {
    transition: transform 0.3s ease;
}

.footer-custom .fab:hover {
    transform: scale(1.1);
}
.navbar-custom {
    background: linear-gradient(to right, #2c3e50, #3498db);
    padding: 15px 0;
}

.navbar-custom .navbar-brand,
.navbar-custom .navbar-nav .nav-link {
    color: #ecf0f1;
}

.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-nav .nav-link:hover {
    color: #bdc3c7;
}

.navbar-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(236, 240, 241, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
}

.navbar-brand span {
    font-size: 1.2rem;
}

.input-group {
    width: 300px;
}

.form-control {
    background-color: rgba(236, 240, 241, 0.1);
    color: #2c3e50; /* Dark color for better visibility */
}

.form-control:focus {
    background-color: rgba(236, 240, 241, 0.2);
    color: #2c3e50;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
    color: #2c3e50;
}

.form-control::placeholder {
    color: rgba(44, 62, 80, 0.7); /* Darker placeholder color */
}

.btn-search {
    background-color: #e74c3c;
    color: #ecf0f1;
    border: none;
}

.btn-search:hover {
    background-color: #c0392b;
    color: #ecf0f1;
}
#map {
    height: 31rem;
}
.asteriskField {
    display: none;
}
.lum-photo-card {
    border-radius:4%;
    width:70%;
    height:70%;
    position:absolute;
    top:10%;
    left:17%;
}
.lum-photo-main {
    border-radius:4%;
    width:63%;
    height:63%;
    position:absolute;
    top:11%;
    left:22%;
}
.luminaria-story-text {
    font-family: 'Merienda One', cursive;
    font-size: calc(1.2rem + 2vmin);
}
body {
    background-color: #FCFCFC;
}

html {
    position: relative;
    min-height: 100%;
}

.footer-bg {
    background-color: #f5f5f5;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 3.5rem;
    /* Set the fixed height of the footer here */
    line-height: 3.5rem;
    /* Vertically center the text there */
}
#goal {
    font-size: calc(1.2rem + 2vmin);
    text-align: center;
    font-weight: bold;
}
#glass {
    width: 100%;
    background: #dccde4;
    height: 25px;
    border-radius: 10px;
    float: left;
    overflow: hidden;
}
.goal-stat {
    padding: .6rem;
    text-align: center;
}
.goal-number, .goal-label {
    display: block;
}
.goal-number {
    font-weight: bold;
}
.social-share {
    font-size: 16px;
    font-size: calc(1.4rem + 2vmin);;
}

/* BEGIN SELECT2 BOOSTRAP4 THEME */
.select2-container {
    display: block;
}
.select2-container *:focus {
    outline: 0;
}
.input-group .select2-container--bootstrap4 {
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
}
.input-group-prepend ~ .select2-container--bootstrap4 .select2-selection {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group > .select2-container--bootstrap4:not(:last-child) .select2-selection {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.select2-container--bootstrap4 .select2-selection {
    width: 100%;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
    .select2-container--bootstrap4 .select2-selection {
        -webkit-transition: none;
        transition: none;
    }
}
.select2-container--bootstrap4.select2-container--focus .select2-selection {
    border-color: #80bdff;
    -webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.select2-container--bootstrap4.select2-container--focus.select2-container--open .select2-selection {
    border-bottom: none;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
.select2-container--bootstrap4.select2-container--open.select2-container--above .select2-selection {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.select2-container--bootstrap4.select2-container--open.select2-container--below .select2-selection {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
.select2-container--bootstrap4.select2-container--disabled .select2-selection,
.select2-container--bootstrap4.select2-container--disabled.select2-container--focus .select2-selection {
    cursor: not-allowed;
    background-color: #e9ecef;
    border-color: #ced4da;
    -webkit-box-shadow: none;
    box-shadow: none;
}
.select2-container--bootstrap4.select2-container--disabled .select2-search__field,
.select2-container--bootstrap4.select2-container--disabled.select2-container--focus .select2-search__field {
    background-color: transparent;
}
select.is-invalid ~ .select2-container--bootstrap4 .select2-selection,
form.was-validated select:invalid ~ .select2-container--bootstrap4 .select2-selection {
    border-color: #dc3545;
}
select.is-valid ~ .select2-container--bootstrap4 .select2-selection,
form.was-validated select:valid ~ .select2-container--bootstrap4 .select2-selection {
    border-color: #28a745;
}
.select2-container--bootstrap4 .select2-search {
    width: 100%;
}
.select2-container--bootstrap4 .select2-dropdown {
    border-color: #ced4da;
    border-radius: 0;
}
.select2-container--bootstrap4 .select2-dropdown.select2-dropdown--below {
    border-top: none;
    border-bottom-right-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}
.select2-container--bootstrap4 .select2-dropdown.select2-dropdown--above {
    border-top: 1px solid #ced4da;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}
.select2-container--bootstrap4 .select2-dropdown .select2-results__option[aria-selected="true"] {
    color: #212529;
    background-color: #f2f2f2;
}
.select2-container--bootstrap4 .select2-results__option--highlighted,
.select2-container--bootstrap4 .select2-results__option--highlighted.select2-results__option[aria-selected="true"] {
    color: #fff;
    background-color: #007bff;
}
.select2-container--bootstrap4 .select2-results__option[role="group"] {
    padding: 0;
}
.select2-container--bootstrap4 .select2-results__option[role="group"] .select2-results__options--nested .select2-results__option {
    padding-left: 1em;
}
.select2-container--bootstrap4 .select2-results__option {
    padding: 0.375rem 0.75rem;
}
.select2-container--bootstrap4 .select2-results > .select2-results__options {
    max-height: 15em;
    overflow-y: auto;
}
.select2-container--bootstrap4 .select2-results__group {
    display: list-item;
    padding: 6px;
    color: #6c757d;
}
.select2-container--bootstrap4 .select2-selection__clear {
    float: right;
    width: 0.9em;
    height: 0.9em;
    padding-left: 0.15em;
    margin-top: 0.7em;
    margin-right: 0.3em;
    line-height: 0.75em;
    color: #f8f9fa;
    background-color: #c8c8c8;
    border-radius: 100%;
}
.select2-container--bootstrap4 .select2-selection__clear:hover {
    background-color: #afafaf;
}
.select2-container--bootstrap4 .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px) !important;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__placeholder {
    line-height: calc(1.5em + 0.75rem);
    color: #6c757d;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    position: absolute;
    top: 50%;
    right: 3px;
    width: 20px;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
    position: absolute;
    top: 60%;
    left: 50%;
    width: 0;
    height: 0;
    margin-top: -2px;
    margin-left: -4px;
    border-color: #343a40 transparent transparent transparent;
    border-style: solid;
    border-width: 5px 4px 0;
}
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    padding-left: 0.75rem;
    line-height: calc(1.5em + 0.75rem);
    color: #495057;
}
.select2-search--dropdown .select2-search__field {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}
.select2-results__message {
    color: #6c757d;
}
.select2-container--bootstrap4 .select2-selection--multiple {
    min-height: calc(1.5em + 0.75rem + 2px) !important;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    width: 100%;
    padding: 0 0.375rem;
    margin: 0;
    list-style: none;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    float: left;
    padding: 0;
    padding-right: 0.75rem;
    margin-top: calc(0.375rem - 2px);
    margin-right: 0.375rem;
    color: #495057;
    cursor: pointer;
    border: 1px solid #bdc6d0;
    border-radius: 0.2rem;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-search__field {
    color: #495057;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice + .select2-search {
    width: 0;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove {
    float: left;
    padding-right: 3px;
    padding-left: 3px;
    margin-right: 1px;
    margin-left: 3px;
    font-weight: 700;
    color: #bdc6d0;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #343a40;
}
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__clear {
    position: absolute !important;
    top: 0;
    right: 0.7em;
    float: none;
    margin-right: 0;
}
.select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice {
    padding: 0 5px;
    cursor: not-allowed;
}
.select2-container--bootstrap4.select2-container--disabled .select2-selection--multiple .select2-selection__choice .select2-selection__choice__remove {
    display: none;
}

/* Remove overlay from croppie viewport to keep functionality clean */
.cr-viewport {
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

/* Luminaria preview styles (simplified: bag as background, image positioned like final render) */
.luminaria-preview {
    position: relative;
    width: 300px; /* logical preview width - increased for better visibility */
    aspect-ratio: 716 / 976; /* maintain output ratio */
    background: url("/static/img/LuminariaBackground.229437b49dbe.webp") center/cover no-repeat;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}

/* Matches .lum-photo-main placement used in final display */
.luminaria-preview-image {
    position: absolute;
    top: 11%;
    left: 22%;
    width: 63%;
    height: 63%;
    object-fit: cover;
    border-radius: 4%;
    display: none; /* shown when populated */
}

.preview-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    pointer-events: none;
}

/* Enhanced Croppie Modal Styles */
#crop-modal .modal-dialog {
    max-width: 85vw;
}

#crop-modal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#crop-modal .modal-header {
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#crop-modal .modal-footer {
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #dee2e6;
}

#crop-container {
    border: 2px dashed #dee2e6;
    transition: border-color 0.3s ease;
    background-color: #f8f9fa;
}

#crop-container:hover {
    border-color: #007bff;
}

/* Custom range slider styling */
#zoom-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    transition: background 0.3s ease;
}

#zoom-slider:hover {
    background: #bbb;
}

#zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
}

#zoom-slider::-webkit-slider-thumb:hover {
    background: #0056b3;
}

#zoom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Croppie enhancements */
.cr-boundary {
    border-radius: 8px;
    overflow: hidden;
}

.cr-viewport {
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.cr-slider-wrap {
    margin-top: 15px;
}

/* Button enhancements for crop modal */
#crop-modal .btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#crop-modal .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#crop-modal .card {
    border-radius: 8px;
}

#crop-modal .card-header {
    border-radius: 8px 8px 0 0;
}

/* Enhanced controls styling */
.controls-section {
    border-top: 1px solid #f1f3f4;
    padding-top: 1rem;
}

.controls-section .form-label {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.tips-section {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    border-left: 3px solid #007bff;
}

.tips-section ul li {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Improved button styling for rotation controls */
#crop-modal .btn-group .btn {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ---------------------- */
/* Mobile Croppie Tuning  */
/* ---------------------- */
/* Make modal more usable on narrow / short viewports */
#crop-modal .modal-content {
    max-height: 100vh;            /* Never exceed viewport height */
    display: flex;
    flex-direction: column;       /* Allow body to scroll while header/footer stay fixed */
}

#crop-modal .modal-body {
    overflow-y: auto;             /* Scroll interior if content taller than viewport */
}

/* Constrain croppie boundary on any screen to avoid overflows */
#crop-modal .cr-boundary {
    max-height: 65vh;             /* Leave room for header/footer */
}

/* Extra refinements specifically for small devices */
@media (max-width: 575.98px) {
    #crop-modal .modal-dialog {
        max-width: 100%;
        margin: .75rem;           /* Reduce side margins */
    }
    #crop-modal .modal-header, #crop-modal .modal-footer {
        padding: .6rem .9rem;     /* Slightly tighter chrome */
    }
    #crop-modal .modal-title {
        font-size: 1rem;
    }
    #crop-modal .modal-body {
        padding: 0.85rem 0.85rem 1rem;
        max-height: calc(100vh - 6.5rem); /* Header + footer reserved space */
    }
    /* Stack columns (cropper + preview) vertically */
    #crop-modal .modal-body .row {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin: 0;                 /* Remove Bootstrap negative gutter offsets */
    }
    #crop-modal .modal-body [class*="col-md"] {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;                /* Tighter spacing */
    }
    /* Crop area should scale to width and limit height */
    #crop-modal .cr-boundary {
        width: 100% !important;
        max-height: 55vh;          /* Smaller on phones */
    }
    /* Live preview sizing */
    .luminaria-preview {
        width: 80%;
        max-width: 320px;
        margin: 0 auto 1rem;
    }
    /* Ensure slider / controls don't wrap awkwardly */
    #crop-modal .cr-slider-wrap {
        padding: 0 .25rem;
    }
    #crop-modal .btn-group .btn {
        font-size: 0.7rem;
        padding: .35rem .45rem;
    }
}

/* Slightly wider small tablets */
@media (min-width: 576px) and (max-width: 767.98px) {
    #crop-modal .cr-boundary { max-height: 60vh; }
}

/* Landscape phones: increase height a bit if width is ample */
@media (max-height: 500px) and (orientation: landscape) {
    #crop-modal .cr-boundary { max-height: 50vh; }
    #crop-modal .modal-body { max-height: calc(100vh - 5.5rem); }
}

