/* Field-level validation error styling */
.field-error-message {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Invalid input styling */
.form-control.is-invalid,
.form-control.border-danger {
    border-color: #dc3545 !important;
    border-width: 2px;
}

.form-control.is-invalid:focus,
.form-control.border-danger:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Position Images and Hover Effects */
.adv-position-images-container {
    position: relative;
    width: 100%;
    height: 300px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.adv-position-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    transition: all 0.3s ease;
    z-index: 1;
}

.adv-position-image.active {
    opacity: 1;
    z-index: 10;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.adv-position-options {
    padding: 0 15px;
}

.adv-position-option {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.adv-position-option:hover {
    background-color: #f8f9fa;
}

.adv-position-option .form-check {
    margin: 0;
}

.adv-position-option .form-check-label {
    cursor: pointer;
    padding-left: 5px;
}

.adv-position-option .form-check-input:checked {
    background-color: #f06022;
    border-color: #f06022;
}

/* Cost Summary Styles */

.sticky-bottom-fixed {
    position: relative;
    bottom: 0px;
    left: 0px;
    z-index: 1;
    margin-top: auto;
    border-radius: 16px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #E45B21 0%, #522f21 100%);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.cost-summary-bubble {
    position: relative;
    z-index: 1;
    margin-top: auto;
    border-radius: 16px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #E45B21 0%, #522f21 100%) !important;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

#costSummary.cost-summary-bubble {
    background: linear-gradient(135deg, #E45B21 0%, #522f21 100%) !important;
}

@media(min-width: 1250px) {
    .sticky-bottom-fixed {
        position: sticky;
        bottom: 20px;
    }
}

.cost-summary-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    color: white;
}

.cost-info {
    display: flex;
    flex-direction: column;
    width: 50%;
    gap: 8px;
}

.cost-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.original-cost-section,
.additional-cost-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 50%;
}

.cost-label {
    font-size: 1.4rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cost-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.cost-value .cost-amount {
    font-size: 2rem;
    font-weight: 600;
}

.cost-value .cost-currency {
    font-size: 1.4rem;
    font-weight: 400;
    opacity: 0.9;
}

.cost-amount {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cost-currency {
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0.9;
}

.cost-details {
    display: flex;
    width: 100%;
    align-items: center;
}

.cost-breakdown-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    padding: 6px 14px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.cost-breakdown-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cost-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
    font-size: 1.2rem;
}

.balance-amount {
    font-weight: 600;
    font-size: 2rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

#saveAdBtn {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#saveAdBtn:hover:not(:disabled) {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#saveAdBtn:disabled {
    background: rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.insufficient-funds-alert {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    padding: 12px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease-out;
}

.alert-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    font-weight: 500;
}

.alert-content .btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 12px;
    transition: all 0.2s ease;
}

.alert-content .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.cost-summary-loading {
    position: relative;
}

.cost-summary-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit;
    backdrop-filter: blur(2px);
}

/* Cost breakdown popover styles */
.popover-header {
    background: var(--bs-primary);
    color: white;
    border: none;
    font-weight: 600;
}

.popover-body {
    padding: 0;
    max-width: 300px;
}

.cost-breakdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cost-breakdown-item {
    padding: 12px 16px;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cost-breakdown-item:last-child {
    border-bottom: none;
}

.cost-breakdown-item.total {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

.breakdown-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.breakdown-name {
    font-weight: 500;
    color: #2d3748;
    font-size: 1.4rem;
}

.breakdown-description {
    font-size: 1.2rem;
    color: #718096;
}

.breakdown-cost {
    font-weight: 600;
    color: #4a5568;
}

.subscription-type-card {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

.subscription-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(120deg, #ff9f43, #f25c05);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.subscription-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.subscription-body p {
    line-height: 1.4;
}

.subscription-toggle {
    padding-left: 0;
}

.subscription-toggle .form-check-input {
    width: 48px;
    height: 24px;
    margin: 0;
    margin-right: 10px;
}

.subscription-toggle .form-check-label {
    font-size: 1.4rem;
}

.subscription-end-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #1f2937;
}

.subscription-end-date i {
    color: #f25c05;
}

.subscription-expired-note i {
    color: #f25c05;
}

.subscription-icon-img {
    width: 26px;
    height: 26px;
}

.subscription-end-date-icon {
    width: 18px;
    height: 18px;
}

/* Responsive design */
@media (max-width: 768px) {
    .sticky-bottom-fixed,
    .cost-summary-bubble {
        border-radius: 12px;
        margin-bottom: 0;
    }

    .cost-summary-container {
        flex-direction: column;
        gap: 24px;
        padding: 24px 20px;
    }

    .cost-info {
        width: 100%;
        text-align: left;
        gap: 16px;
        display: flex;
        flex-direction: column;
    }

    .original-cost-section,
    .additional-cost-section {
        width: 100%;
        gap: 8px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .additional-cost-section {
        border-bottom: none;
        padding-bottom: 0;
    }

    .cost-label {
        font-size: 1.4rem;
        margin-bottom: 8px;
        opacity: 0.9;
        letter-spacing: 0.3px;
    }

    .cost-value {
        gap: 8px;
    }

    .cost-value .cost-amount {
        font-size: 2rem;
        line-height: 1.2;
    }

    .cost-value .cost-currency {
        font-size: 1.3rem;
    }

    .cost-main {
        gap: 8px;
    }

    .cost-amount {
        font-size: 2rem;
        line-height: 1.2;
    }

    .cost-currency {
        font-size: 1.3rem;
    }

    .cost-details {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
        padding-top: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .cost-breakdown-btn {
        font-size: 1.4rem;
        padding: 12px 24px;
        width: 100%;
        justify-content: center;
    }

    .cost-actions {
        width: 100%;
        align-items: stretch;
        gap: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .user-balance {
        font-size: 1.15rem;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 12px 0;
        flex-wrap: wrap;
        gap: 10px;
    }

    .balance-amount {
        font-size: 1.25rem;
        padding: 10px 16px;
        white-space: nowrap;
    }

    #saveAdBtn {
        width: 100%;
        padding: 18px 24px;
        text-align: center;
    }

}

/* Extra small mobile devices */
@media (max-width: 576px) {
    .cost-summary-container {
        padding: 20px 16px;
        gap: 20px;
    }

    .cost-info {
        gap: 16px;
    }

    .original-cost-section,
    .additional-cost-section {
        padding-bottom: 16px;
    }

    .cost-label {
        font-size: 1.4rem;
    }

    .cost-value .cost-amount,
    .cost-amount {
        font-size: 1.75rem;
    }

    .cost-value .cost-currency,
    .cost-currency {
        font-size: 1.2rem;
    }

    .cost-breakdown-btn {
        font-size: 1.4rem;
        padding: 12px 20px;
    }

    .user-balance {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .balance-amount {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
    }

    #saveAdBtn {
        padding: 18px 20px;
    }
}


/* Account Deletion Banner */
.account-deletion-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border: 1px solid #fed7d7;
    border-left: 4px solid #F06022; /* Sakaraka orange */
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.account-deletion-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(240, 96, 34, 0.05) 100%);
    pointer-events: none;
}

.account-deletion-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #fee2e2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F06022;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    flex-shrink: 0;
}

.account-deletion-content {
    flex-grow: 1;
    padding-left: 20px;
}

.account-deletion-title {
    color: #1a202c;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.account-deletion-message {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.account-deletion-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.account-deletion-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    color: #c53030;
    font-size: 0.85rem;
    font-weight: 600;
}

.account-deletion-actions .btn-cancel-delete {
    background-color: #fff;
    color: #c53030;
    border: 1px solid #fc8181;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    line-height: 1.4;
    white-space: nowrap;
}

.account-deletion-actions .btn-cancel-delete:hover {
    background-color: #c53030;
    color: #fff;
    border-color: #c53030;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(197, 48, 48, 0.15);
}

@media (max-width: 768px) {
    .account-deletion-card {
        flex-direction: column;
        padding: 20px;
    }
    
    .account-deletion-icon-wrapper {
        margin-bottom: 12px;
    }
    
    .account-deletion-content {
        padding-left: 0;
    }

    .account-deletion-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .account-deletion-actions {
        width: 100%;
        margin-top: 10px;
    }

    .account-deletion-actions .d-flex {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .account-deletion-actions .btn-cancel-delete {
        width: auto;
    }
}

/* Existing styles */
#continentsAccordion .accordion-item {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

#continentsAccordion .accordion-button {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    box-shadow: none;
    font-weight: 500;
}

#continentsAccordion .accordion-button:not(.collapsed) {
    background-color: #fff;
    border-color: #dee2e6;
}

#continentsAccordion .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(240, 96, 34, 0.25);
    border-color: #f06022;
}

#continentsAccordion .accordion-button::after {
    filter: invert(0.5);
}

#continentsAccordion .form-check-input:checked {
    background-color: #f06022;
    border-color: #f06022;
}

#continentsAccordion .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(240, 96, 34, 0.25);
    border-color: #f06022;
}

#continentsAccordion .form-check-input:indeterminate {
    background-color: #6c757d;
    border-color: #6c757d;
}

#continentsAccordion .accordion-body {
    background-color: #fff;
    max-height: 200px;
    overflow-y: auto;
}

#continentsAccordion .form-check-label {
    cursor: pointer;
}

/* Custom scrollbar for country list */
#continentsAccordion .accordion-body::-webkit-scrollbar {
    width: 6px;
}

#continentsAccordion .accordion-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#continentsAccordion .accordion-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#continentsAccordion .accordion-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Search input styling */
#countrySearchInput {
    border: 1px solid #e9ecef;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#countrySearchInput:focus {
    border-color: #f06022;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(240, 96, 34, 0.25);
}

#countrySearchInput::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Image Upload Sections */
.image-upload-section {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: white;
}

.image-upload-section h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.upload-field {
    margin-bottom: 15px;
}

.upload-field label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

.upload-field small {
    color: #6c757d;
    font-size: 12px;
}

.image-preview {
    margin-top: 10px;
}

.image-preview img {
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.remove-image-btn {
    margin-left: 12px;
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #dc2626;
    color: #dc2626;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-image-btn:hover {
    background: #dc2626;
    color: white;
}

/* Upload Card Styles */
.upload-card {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-card:hover {
    border-color: #f06022;
    background: #fff5f1;
}

.upload-card.has-image {
    border: 2px solid #10b981;
    border-style: solid;
    background: white;
    min-height: 150px;
    height: 184px;
}

.upload-card.has-image:hover {
    border-color: #059669;
}

.upload-placeholder {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.upload-image-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.upload-card:hover .upload-overlay {
    opacity: 1;
}

.upload-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.upload-text {
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.upload-dimensions {
    font-size: 12px;
    color: #6b7280;
}

/* Image Cropper Modal Styles */

.cropper-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Changed from auto to hidden to prevent double scrollbars */
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    /* Flex centering */
    align-items: center;
    justify-content: center;
}

.cropper-modal-content {
    position: relative;
    background-color: #ffffff !important;
    margin: 0;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    opacity: 1 !important;
    z-index: 10001;
}

.cropper-container {
    width: 100%;
    height: 500px; /* Specific height is important for cropper.js */
    background-color: #f8f9fa;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.cropper-info {
    margin-bottom: 15px;
    font-size: 14px;
    color: #6c757d;
}

.cropper-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: auto;
}

/* Location Placement Styles - Figma Design Match */
.location-category-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Left Preview Area (40%) */
.preview-main-container {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 24px;
    min-height: 300px;
    position: sticky;
    /* top: 20px; */
    top: calc(50dvh - 112px);
}

.current-location-preview {
    min-height: 250px;
}

.default-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    text-align: center;
}

.sakaraka-ad-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.ads-text {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.preview-instruction {
    color: #9ca3af;
    font-size: 12px;
    margin-top: 15px;
}

.location-preview {
    transition: all 0.2s ease;
}

.location-preview-title {
    color: #f06022;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.preview-box {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    min-height: 100px;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.preview-box.has-image {
    border: 2px solid #10b981;
    border-style: solid;
}

.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.placeholder-text {
    color: #9ca3af;
    font-size: 12px;
    text-align: center;
}

.preview-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

/* Right Side Location Options (60%) */
.location-selection-list {
    padding: 0;
}

.location-option {
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    background: white;
}

.location-option:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.location-option.selected {
    background: #fef3f2;
    border-color: #f06022;
}

.location-check-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.location-checkbox {
    width: 16px;
    height: 16px;
    margin: 2px 0 0 0;
    accent-color: #f06022;
    cursor: pointer;
}

.location-label {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.location-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    line-height: 1.4;
}

.location-cost {
    margin-left: auto;
    flex-shrink: 0;
}

.cost-badge {
    display: inline-block;
    background: linear-gradient(135deg, #E45B21 0%, #c94d1a 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.device-icons {
    display: flex;
    gap: 8px;
}

.device-icon {
    font-size: 12px;
    color: #6b7280;
    opacity: 0.7;
}

.location-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 6px;
}

.location-dimensions {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

/* Category Header */
.category-arrow {
    transition: transform 0.2s ease;
}

.category-arrow.rotated {
    transform: rotate(180deg);
}

/* Selected Locations Upload Section */
.selected-locations-uploads {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.upload-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.upload-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.upload-section-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 0;
}

.upload-field {
    margin-bottom: 16px;
}

.upload-field label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
    color: #374151;
}

/* Upload Cards - Side by Side Layout */
.upload-cards-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.upload-card {
    flex: 1;
    min-width: 200px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.upload-card:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.upload-card.has-image {
    border-color: #10b981;
    border-style: solid;
    height: 184px;
    background: white;
}

.upload-card.has-image:hover {
    border-color: #059669;
}

.upload-icon {
    font-size: 24px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.upload-text {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

.upload-dimensions {
    color: #6b7280;
    font-size: 11px;
    margin-top: 4px;
}

.image-preview-container {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    display: none;
    text-align: left;
}

.image-preview-container.show {
    display: block;
}

.preview-image {
    max-width: 200px;
    max-height: 120px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.remove-image-btn {
    margin-left: 12px;
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #dc2626;
    color: #dc2626;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-image-btn:hover {
    background: #dc2626;
    color: white;
}

/* Legacy styles cleanup - Hide all old preview elements */
.image-preview-container {
    display: none !important;
}

.image-preview {
    display: none !important;
}

/* Hide any elements that might be created by legacy functions */
div[id^="preview_"]:not([id*="upload_preview_"]) {
    display: none !important;
}

/* Hide accordion arrow for leaf categories (no children) */
.accordion-item .accordion-button:not([data-bs-toggle])::after,
.accordion-item .accordion-button[style*="cursor: default"]::after {
    display: none !important;
}

/* Ensure leaf category accordion buttons don't have toggle behavior */
.accordion-item .accordion-button[style*="cursor: default"] {
    pointer-events: none;
}

.accordion-item .accordion-button[style*="cursor: default"] .form-check {
    pointer-events: auto;
}

/* Additional Preview Styles */
.additional-location-preview {
    min-height: 200px;
}

.default-additional-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}

.additional-placeholder {
    color: #6c757d;
}

.preview-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.preview-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #495057;
}

.preview-subtext {
    font-size: 13px;
    color: #6c757d;
}

.location-details {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.location-detail-title {
    color: #f06022;
    margin-bottom: 10px;
    font-weight: 600;
}

.location-detail-description {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 14px;
}

.dimension-info {
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.dimension-item {
    margin-bottom: 8px;
    font-size: 14px;
    color: #495057;
}

.dimension-note {
    margin-top: 10px;
    padding: 8px;
    background: #e8f4fd;
    border-radius: 4px;
}

/* Location Preview Image Styles */
.preview-image-container {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.location-preview-image {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    display: block;
}

.location-preview-image-container {
    position: relative;
    overflow: hidden;
}

.location-preview-image-container img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.location-preview-image-container:hover img {
    transform: scale(1.05);
}

/* Saved-draft banner shown at the top of the create form */
.draft-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8cc 100%);
    border: 1px solid #ffd8a8;
    border-radius: 16px;
    padding: 16px 24px;
    margin-bottom: 24px;
    color: #7f4a12;
}

.draft-banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.draft-banner .btn {
    border: 1px solid #e45b21;
    color: #e45b21;
    background: transparent;
    padding: 6px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.draft-banner .btn:hover {
    background: #e45b21;
    color: #fff;
}

/* Save-draft sits beside submit inside the cost summary */
.cost-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.save-draft-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    border-radius: 30px;
    padding: 10px 20px;
    transition: all 0.2s ease;
}

.save-draft-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
}

.save-draft-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .cost-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
}