/* Shepherd.js Custom Tour Styles */

/* Reduce padding around the highlighted element */
.shepherd-modal-overlay-container .shepherd-modal-overlay {
  /* This controls the overlay itself */
  background: rgba(0,0,0,0.5) !important;
}

/* Shepherd.js v11+ uses these CSS variables for the highlight opening */
.shepherd-modal-overlay-container[data-popper-placement] .shepherd-modal-overlay {
  --shepherd-modal-overlay-opening-padding: 4px !important; /* Reduce padding */
  --shepherd-modal-overlay-opening-radius: 16px !important; /* Add border radius */
}

/* For older versions or to be extra sure, target the opening directly */
.shepherd-modal-overlay-container .shepherd-modal-overlay-opening {
  padding: 4px !important;
  border-radius: 16px !important;
  /* UPDATED: Colored border */
  box-shadow: 0 0 0 2px #76D7C0 !important; 
}

/* Force the overlay to be invisible */
.shepherd-modal-overlay-container {
    /* Make background transparent */
    background: transparent !important; 
    
    /* Remove the blur effect */
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Hide the dark SVG overlay layer that Shepherd draws */
.shepherd-modal-overlay-container .shepherd-modal-overlay {
    opacity: 0 !important; 
}



.shepherd-enabled.shepherd-element,
.shepherd-target {
    position: relative;
    z-index: 9999 !important;
    width: fit-content !important;
}

.shepherd-element {
    z-index: 10000 !important;
    max-width: 720px !important;
    border-radius: 8px !important;
}

.shepherd-header {
    padding: 0 !important;
}

.shepherd-text {
    padding: 0 !important;
}

.shepherd-element .shepherd-content {
    background: linear-gradient(140deg, rgba(255,255,255,0.98), rgba(252, 240, 245, 0.98));
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.35);
    max-width: 720px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;

}

.tanzi-tour-step {
    margin-top: 28px;
}

.tanzi-tour-step .shepherd-content::before {
    content: "";
    position: absolute;
    top: -10px;
    left: var(--arrow-align, 50%);
    transform: translateX(-50%) rotate(45deg);
    width: 20px;
    height: 20px;
    background: #fef7fa;
    border-top: 1px solid rgba(255, 255, 255, 0.65);
    border-left: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 3px;
    z-index: 0;
}

.tanzi-step {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 12px 12px 0px 12px;
}

.tanzi-step__media {
    /* flex: 0 0 260px; */
    border-radius: 32px 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 10px 0px 10px;
    position: relative;
    overflow: hidden;
}

.tanzi-step__media-inner {
    /* width: 100px; */
    max-width: 240px;
    width: 130px;
}

.tanzi-step__media img {
    width: 100%;
    height: auto;
    display: block;
}

.tanzi-step__copy {
    flex: 1;
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tanzi-step__eyebrow {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    /* UPDATED: Eyebrow text color */
    color: #76D7C0;
    font-weight: 600;
}

.tanzi-step__title {
    font-size: clamp(1.5rem, 2vw, 2rem);
    margin: 0;
    color: #1f2933;
    font-weight: 700;
}

.tanzi-step__text {
    font-size: 1.05rem;
    color: #475467;
    line-height: 1.65;
    margin: 0;
}

.shepherd-cancel-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    position: absolute;
    right: 20px;
    top: 20px;
    background: rgba(0,0,0,0.05);
    cursor: pointer;
}

.shepherd-cancel-icon::before,
.shepherd-cancel-icon::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: #6b7280;
    top: 50%;
    left: 50%;
    transform-origin: center;
}

.shepherd-cancel-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.shepherd-cancel-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}


.shepherd-footer {
    border-top: none;
    display: flex;
    justify-content: flex-end;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.shepherd-button {
    font-size: 1rem;
    padding: 0.7rem 2.1rem;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shepherd-button-primary {
    /* UPDATED: Background color */
    background: #76D7C0; 
    color: #fff;
    /* UPDATED: Shadow color (rgba of #76D7C0) */
    box-shadow: 0 18px 30px rgba(118, 215, 192, 0.4);
}

.shepherd-button-primary:hover {
    transform: translateY(-2px);
}

.shepherd-button-secondary {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e5e7eb;
    box-shadow: inset 0 -2px 0 rgba(15, 23, 42, 0.05);
    margin-right: 0px;
}

.shepherd-arrow {
    display: none !important;
}

/* --- FIX: CLOSE BUTTON UNCLICKABLE ON MOBILE --- */
.shepherd-element .shepherd-cancel-icon {
    /* 1. Force it to the top layer so nothing covers it */
    z-index: 20000 !important; 
    
    /* 2. Ensure it ignores parent 'pointer-events: none' settings */
    pointer-events: auto !important;
    cursor: pointer !important;

    /* 3. Make the touch area bigger (44px is standard for mobile) */
    width: 44px !important;
    height: 44px !important;
    
    /* 4. Reset position to ensure it's in the corner */
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    
    /* 5. Center the 'X' icon inside the bigger button */
    display: flex !important;
    align-items: center;
    justify-content: center;
    
    /* Optional: Add a white background so it stands out against images */
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px);
}

/* Ensure the 'X' lines themselves don't block the click */
.shepherd-element .shepherd-cancel-icon span,
.shepherd-element .shepherd-cancel-icon::before,
.shepherd-element .shepherd-cancel-icon::after {
    pointer-events: none !important;
}

@media (max-width: 1024px) {
    .tanzi-step {
        flex-direction: column;
    }

    .tanzi-step__media {
        border-radius: 32px 32px 0 0;
        flex: none;
        padding: 2rem;
    }

    .tanzi-step__copy {
        padding: 2rem;
    }
}

@media (max-width: 640px) {
    .shepherd-element .shepherd-content {
        max-width: 80vw;
        max-height: 70vh;
        overflow-y: auto;
    }

    .tanzi-step__copy {
        padding: 10px;
        align-items: center;
        text-align: center;
    }

    .tanzi-step__eyebrow {
        letter-spacing: 0.18em;
    }

    .shepherd-footer {
        flex-direction: column;
        padding: 0 1.5rem 1.5rem;
    }

    .shepherd-button {
        width: 100%;
        text-align: center;
    }
    .tanzi-step__media {
        padding: 20px 0px; 
    }
    .tanzi-step__media-inner{
        width: 100px;
    }

    .tanzi-step__title {
        font-size: 22px!important;
    }
    .tanzi-step__text{
        font-size: 14px !important;
    }
    .tanzi-step__eyebrow {
        font-size: 12px !important;
    }
}

@keyframes shepherdFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shepherd-element {
    animation: shepherdFadeIn 0.35s ease-out;
}