/* Wrapper and layout */
.srf-wrapper {
    margin: 2rem 0;
    font-family: inherit;
}

.srf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .srf-layout {
        grid-template-columns: 1fr;
    }
}

/* Form */
.srf-form {
    background: #fff;
    border: 1px solid #e1e1e1;
    padding: 1.5rem;
    border-radius: 8px;
}

.srf-form__field {
    margin-bottom: 1rem;
}

.srf-form__field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.srf-form__field input[type="text"],
.srf-form__field input[type="email"],
.srf-form__field select,
.srf-form__field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.srf-form__field textarea {
    resize: vertical;
}

.srf-form__field--checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

.srf-field__help {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 0.25rem;
}

.srf-required {
    color: #d63638;
    margin-left: 0.15rem;
}

.srf-form__actions {
    margin-top: 1.5rem;
}

.srf-button {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: #2271b1;
    color: #fff;
}

.srf-button:hover {
    background: #135e96;
}

/* Service info block */
.srf-service-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e1e1e1;
    min-height: 200px; /* Ensure minimum height */
}

.srf-service-info__title {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.srf-service-info__text p:last-child {
    margin-bottom: 0;
}



/* Replace the entire slider section with this: */

/* Slider styles - FIXED for better browser compatibility */
.srf-service-slider {
    margin-top: 1rem;
    position: relative;
    width: 100%;
}

.srf-service-slider__viewport {
    position: relative;
    width: 100%;
    height: 300px; /* Increased height */
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.srf-service-slider__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block !important; /* Force display block */
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Ensure only one image is visible */
.srf-service-slider__viewport img:not(:first-of-type) {
    display: none !important;
}

.srf-service-slider__nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    z-index: 2;
    position: relative;
}

.srf-service-slider__prev,
.srf-service-slider__next {
    background: #2271b1;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.srf-service-slider__prev:hover,
.srf-service-slider__next:hover {
    background: #135e96;
}

/* Hide nav when only one image */
.srf-service-slider__nav.hidden {
    display: none;
}





/* User requests placeholder */
.srf-user-requests {
    margin-top: 2rem;
}

.srf-user-requests__title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.srf-user-requests__placeholder {
    font-size: 0.9rem;
    color: #666;
}


/* Popup for business account requirement */
.srf-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.srf-popup {
    background: #ffffff;
    padding: 1.5rem;
    max-width: 420px;
    width: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    text-align: left;
}

.srf-popup__title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.srf-popup__message {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.srf-popup__button {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    background: #2271b1;
    color: #ffffff;
}

.srf-popup__button:hover {
    background: #135e96;
}


/* Shipping address display */
.srf-shipping-box {
    border: 1px solid #e1e1e1;
    background: #fff;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 14px;
    line-height: 1.4;
    white-space: normal;
}

.srf-shipping-missing {
    border: 1px solid #f0b849;
    background: #fff8e5;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 14px;
    line-height: 1.4;
}

.srf-form__errors {
    padding: 12px 14px;
    border: 1px solid #d63638;
    background: #fff5f5;
    border-radius: 8px;
    margin-bottom: 14px;
}

.srf-form__errors ul { 
    margin: 0; 
    padding-left: 18px; 
}

.srf-form__success {
    padding: 12px 14px;
    border: 1px solid #46b450;
    background: #f0fff4;
    border-radius: 8px;
    margin-bottom: 14px;
}



/* =========================================================
   Service Item → Phase 4 Integration Styles
   (ADD ONLY – does not replace existing CSS)
========================================================= */

/* Improve service item grouping */
.srf-service-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1.5rem;
}

/* Make service items visually consistent with SRF UI */
.srf-service-item {
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1e1e1e;
    user-select: none;
}

/* Hover refinement */
.srf-service-item:hover {
    background: #eef2f6;
    border-color: #cfd8e3;
}

/* Active service item (synced with selection) */
.srf-service-item.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #ffffff;
}

/* Ensure Phase-4 service info visually connects */
.srf-layout__service-info {
    animation: srfFadeIn 0.25s ease-out;
}

/* Smooth reveal animation */
@keyframes srfFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optional: tighten spacing when service info updates */
.srf-service-info {
    transition: background 0.2s ease, border-color 0.2s ease;
}

/* Optional fallback if .srf-service-details is still used somewhere */
.srf-service-details.hidden {
    display: none !important;
}

.srf-service-details.visible {
    display: block !important;
}


/* =========================================================
   Service info: Sticky + scrollable (desktop)
========================================================= */
@media (min-width: 901px) {
  .srf-layout__service-info {
    position: sticky;
    top: 110px;               /* adjust if your header is taller */
    max-height: calc(100vh - 140px);
    overflow: auto;
    padding-right: 6px;       /* little space for scrollbar */
  }
}

/* =========================================================
   Service info: Collapse long text + gradient fade
========================================================= */
.srf-service-info__text.is-collapsed {
  max-height: 260px;          /* collapsed height */
  overflow: hidden;
  position: relative;
}

.srf-service-info__text.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  background: linear-gradient(to bottom, rgba(248,249,250,0), rgba(248,249,250,1));
  pointer-events: none;
}

.srf-service-info__toggle {
  margin-top: 10px;
  border: 1px solid #d0d7de;
  background: #fff;
  color: #1f2328;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

.srf-service-info__toggle:hover {
  background: #f6f8fa;
}


.srf-service-info__subtitle {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
}

.srf-service-info__variants-list {
  margin: 0;
  padding-left: 18px;
}

.srf-service-info__variants-list li {
  margin: 4px 0;
}
