:root {
    --signup-primary-color: #32a8b3;
    --signup-primary-rgb: 50, 168, 179;
}

.cursor-pointer {
    cursor: pointer;
}

.transition-transform {
    transition: transform 0.2s ease-in-out;
    display: inline-block;
}

.rotate-90 {
    transform: rotate(90deg);
}

/* Custom Scrollbar for Services Tree */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Branded Custom Checkbox Sync & Hover effects */
.form-theme_item .form-check-input.tree-checkbox {
    transform: scale(1.2);
    margin-top: 0;
}

.form-theme_item .form-check-input:checked {
    background-color: var(--signup-primary-color) !important;
    border-color: var(--signup-primary-color) !important;
}

.form-theme_item .form-check-input:focus {
    border-color: var(--signup-primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--signup-primary-rgb), 0.25) !important;
}

.form-theme_item .form-check-input:hover {
    border-color: var(--signup-primary-color);
}

.tree-category-header.sticky-top-cat {
    position: sticky;
    top: 0;
    z-index: 10;
    opacity: 1;
}

.tree-services-list .form-check-hover:hover {
    background-color: #f9FAFB;
    border-radius: 4px;
}

.form-theme .form-theme_item .form-theme_item__text>a {
    text-decoration: none;
}

.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.success-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    width: 440px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: #E8F8E8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.success-card h3 {
    color: #111215;
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.success-card p {
    color: #55565A;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.fade-in-text {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-home {
    background-color: #5B92B5;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-home:hover {
    background-color: #4A7A9A;
}

.btn-home-danger {
    background-color: #D32F2F;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-home-danger:hover {
    background-color: #B71C1C;
}

/* MODERN-PREMIUM UI CSS REFACTOR */
.services-tree-container {
    background-color: transparent;
    padding: 8px 0;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.service-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.service-category-badge {
    background-color: #f1f5f9;
    color: #334155;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.service-category-line {
    flex-grow: 1;
    height: 1px;
    background-color: #e2e8f0;
}

.service-items-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-checkbox-label {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    padding: 12px 18px;
    background-color: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
}

.service-checkbox-label:hover {
    background-color: #fcfcfc;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transform: translateY(-1px);
}

/* Circular Checkbox */
.service-checkbox-input {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #ced4da;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background-color: #ffffff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-checkbox-input:checked {
    background-color: #1e3a8a;
    /* Deep Navy */
    border-color: #1e3a8a;
    transform: scale(1.05);
    /* Subtle scale up */
}

.service-checkbox-input:checked::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
    animation: checkmarkFadeIn 0.2s ease-in-out forwards;
}

@keyframes checkmarkFadeIn {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0.5);
    }

    100% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
}

.service-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.service-item-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    user-select: none;
}

.service-item-desc {
    font-size: 0.8rem;
    color: #64748b;
    user-select: none;
    line-height: 1.4;
}


/* Minimalist Container */
.tree-category-item {
    border: none;
    box-shadow: none;
    margin-bottom: 24px;
    background-color: transparent;
}

.tree-category-header {
    padding: 10px 16px;
    background-color: transparent;
    border-bottom: 1px solid rgba(46, 176, 185, 0.15);
}

.cat-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.select-all-label {
    font-size: 13px;
    font-weight: 400;
    color: #2EB0B9;
}

.transition-transform {
    transition: transform 0.2s ease;
}

.rotate-90 {
    transform: rotate(90deg);
}

/* Circular Checkbox (Modern Radio-style) */
.custom-checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.custom-checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-box {
    width: 20px;
    height: 20px;
    border: 1.5px solid #2EB0B9;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.custom-checkbox-wrapper input:checked~.custom-box {
    background-color: #2EB0B9;
    border-color: #2EB0B9;
    transform: scale(1.05);
}

.custom-checkbox-wrapper input:checked~.custom-box::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.custom-checkbox-wrapper:active .custom-box {
    transform: scale(0.9);
}

/* Service Row */
.service-item-row {
    padding: 12px 16px;
    /*border-bottom: 1px solid rgba(0, 0, 0, 0.04);*/
    transition: background-color 0.2s ease;
    /*background-color: transparent;*/
}

.service-item-row:last-child {
    border-bottom: none;
}

/* Soft Background on Check */
.service-item-row:has(input:checked) {
    /*background-color: rgba(46, 176, 185, 0.05);*/
}

.service-name {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* Premium Time Picker Dropdown */
.custom-time-dropdown-container {
    position: relative;
    width: 100%;
}

.custom-time-input {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    height: 48px;
}

.custom-time-input:hover {
    border-color: #2EB0B9;
}

.custom-time-input.is-open {
    border-color: #2EB0B9;
    box-shadow: 0 0 0 3px rgba(46, 176, 185, 0.1);
}

.custom-time-input.is-invalid {
    border-color: #ef4444;
}

.time-display {
    flex-grow: 1;
}

.time-icon-svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.time-dropdown-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #f3f4f6;
    padding: 6px;
}

/* Custom Scrollbar */
.time-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.time-dropdown-list::-webkit-scrollbar-track {
    background: transparent;
}

.time-dropdown-list::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

.time-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

.time-option {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.time-option:hover {
    background-color: rgba(46, 176, 185, 0.08);
    color: #2EB0B9;
}

.time-option.active {
    background-color: #2EB0B9;
    color: white;
}

.time-option.active:hover {
    background-color: #2799a1;
}

/* Google Places API (New) Web Component Integration */
gmp-place-autocomplete {
    flex-grow: 1;
    display: flex;
    align-items: center;
    border: 1px solid rgba(228, 229, 233, 1) !important;
    border-radius: 50px !important;
    background-color: #ffffff;
    height: 52px;
    /* Matched to standard form-control height */
    transition: all 0.2s ease-in-out;
}

.form-group-linked gmp-place-autocomplete {
    display: none !important;
}

/* Ensure the original input inside search container stays hidden when JS is active */
.search-mode-container input[id="business-address"] {
    display: none !important;
}

/* But if we are in search mode, the Google component should be visible */
.search-mode-container gmp-place-autocomplete {
    display: flex !important;
}

gmp-place-autocomplete:focus-within {
    border-color: #32a8b3 !important;
    box-shadow: 0 0 0 0.25rem rgba(50, 168, 179, 0.25) !important;
    outline: none !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

gmp-place-autocomplete::part(clear-button) {
    display: none !important;
}

/* Add validation icon when the hidden original input is invalid */
.form-control.is-invalid~gmp-place-autocomplete {
    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") !important;
    background-position: right 18px center !important;
    background-size: 20px !important;
    background-repeat: no-repeat !important;
}

gmp-place-autocomplete::part(input) {
    border: none !important;
    outline: none !important;
    font-size: 15px;
    font-family: inherit;
    color: #111215;
    background-color: transparent;
    width: 100%;
    height: 100%;
}

gmp-place-autocomplete::part(input):focus {
    box-shadow: none !important;
}

/* Validation Feedback for Google Component */
.form-control.is-invalid~gmp-place-autocomplete::part(input) {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.05);
}