@import './fonts.css';
@import './theme.css';

:root {
    --ld-green: #6DB380;
    --ld-green-hover: #5aa16c;
    --ld-teal: #5bb6a9;
    --ld-dark: #3d4043;
    --ld-dark-nav: #464A53;
    --ld-bg: #f4f7f9;
}

body.builder-mode {
    background-color: var(--ld-bg);
}

/* Global Overrides for Builder Mode */
.builder-mode .bg-primary {
    background-color: var(--ld-green) !important;
}

.builder-mode .text-primary {
    color: var(--ld-green) !important;
}

.builder-mode .hover\:bg-primary-hover:hover {
    background-color: var(--ld-green-hover) !important;
}

.builder-mode .peer-checked\:border-primary:checked ~ div,
.builder-mode .peer-checked\:border-primary {
    border-color: var(--ld-green) !important;
}

.builder-mode .peer-checked\:bg-accent:checked ~ div,
.builder-mode .peer-checked\:bg-accent {
    background-color: #f0fdfa !important; /* Light teal/green */
}

.builder-mode .text-primary {
    color: var(--ld-green) !important;
}

.builder-mode input:focus, 
.builder-mode textarea:focus, 
.builder-mode select:focus {
    border-color: var(--ld-green) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(92, 181, 122, 0.2);
}


.builder-mode button[type="submit"], 
.builder-mode .btn-primary {
    border-radius: 2px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: 3rem;
    padding-right: 3rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.ld-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 40px;
    border: 1px solid #e2e8f0;
    background: #f8f9fa;
    color: #696c71;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 2px;
}

.group:hover .ld-toggle-btn,
.ld-toggle-btn:hover, 
input:checked + .ld-toggle-btn,
.ld-toggle-btn.active {
    border: 2px solid var(--ld-teal);
    color: var(--ld-teal);
    background: white;
    padding: 9px 39px; /* Adjust for 2px border to maintain size */
}



.ld-nav-bar {
    background-color: var(--ld-dark-nav);
    color: white;
}

.ld-card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ld-btn-primary {
    background-color: var(--ld-green);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.ld-btn-primary:hover {
    background-color: var(--ld-green-hover);
}

.ld-progress-container {
    height: 4px;
    background-color: #e2e8f0;
    width: 100%;
}

.ld-progress-bar {
    height: 100%;
    background-color: var(--ld-green);
    transition: width 0.5s ease;
}

.ld-selection-card {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ld-selection-card:hover {
    border-color: var(--ld-teal);
    background-color: #f0fdfa;
}

.ld-selection-card.selected {
    border: 3px solid var(--ld-teal);
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(91, 182, 169, 0.1);
}

.builder-mode .bg-white.shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.05);
}

.ld-btn-primary, .builder-mode button[type="submit"] {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


/* Print Styles for Legal Documents */
@media print {
  @page {
    size: A4;
    margin: 1in;
  }
  
  body {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  
  .page-break-after {
    page-break-after: always;
    break-after: page;
  }
  
  /* Hide navigation and UI elements when printing */
  header, footer, nav, .no-print {
    display: none !important;
  }
  
  /* Ensure text is black for printing */
  * {
    color: black !important;
  }
  
  /* Preserve gold color for headers */
  h1[style*="color: #D4AF37"] {
    color: #D4AF37 !important;
  }
  
  /* Preserve gray backgrounds */
  .bg-gray-300 {
    background-color: #D1D5DB !important;
  }
}

/* LawDepot Redesign Styles */
.hero-bg {
    background-image: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.1)), url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
    height: 480px;
    position: relative;
}

.hero-overlap-card {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    width: 90%;
    max-width: 800px;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.15);
    text-align: center;
    z-index: 20;
}

.hero-overlap-card h1 {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.hero-overlap-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.doc-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.75rem;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 1.25rem;
    text-align: center;
}

@media (min-width: 640px) {
    .doc-chip-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem 1rem;
        max-width: 720px;
    }
}

.doc-chip-grid .doc-chip {
    margin: 0;
    min-width: 0;
}

.doc-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #00a88f;
    font-size: 13px;
    font-weight: 500;
    margin: 4px;
    transition: all 0.2s;
    text-decoration: none;
    background: white;
}

.doc-chip:hover {
    border-color: #00a88f;
    background: #f0fdfa;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.main-search-container {
    margin-top: 32px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.main-search-input {
    width: 100%;
    height: 54px;
    padding: 0 3.25rem 0 20px;
    border: 1px solid #ccc;
    border-radius: 27px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
}

.main-search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background-color 0.15s;
}

.main-search-submit:hover {
    color: #00a88f;
    background-color: rgba(0, 168, 143, 0.08);
}

.accomplish-section {
    padding: 60px 0;
    background: #fff;
    text-align: center;
}

.accomplish-heading {
    font-size: 1.375rem;
    line-height: 1.25;
    font-weight: 700;
    color: #374151;
    margin: 0 auto;
    max-width: 42rem;
}

@media (min-width: 640px) {
    .accomplish-heading {
        font-size: 1.875rem;
    }
}

.accomplish-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem 1.5rem;
    max-width: 52rem;
    margin: 2.25rem auto 0;
    text-align: left;
}

@media (min-width: 768px) {
    .accomplish-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem 2.5rem;
        margin-top: 2.5rem;
    }
}

.accomplish-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

@media (min-width: 768px) {
    .accomplish-item {
        padding: 0.45rem 0;
    }
}

.accomplish-item:hover {
    color: #00a88f;
}

.accomplish-item:hover .accomplish-item-icon {
    opacity: 1;
}

.accomplish-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f0fdfa 0%, #ecfdf5 100%);
    opacity: 0.95;
    transition: opacity 0.2s;
}

.accomplish-item-icon i {
    width: 22px;
    height: 22px;
    color: #00a88f;
}

.accomplish-grid .accomplish-item:nth-child(4n + 2) .accomplish-item-icon i {
    color: #0d9488;
}

.accomplish-grid .accomplish-item:nth-child(4n + 3) .accomplish-item-icon i {
    color: #059669;
}

.accomplish-grid .accomplish-item:nth-child(4n + 4) .accomplish-item-icon i {
    color: #0891b2;
}

.accomplish-item-text {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    padding-top: 8px;
}

@media (min-width: 640px) {
    .accomplish-item-text {
        font-size: 16px;
        padding-top: 9px;
    }
}

/* Trust strip (home) */
.home-trust-strip {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #f3f4f6;
    text-align: center;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.home-trust-stars {
    color: #f59e0b;
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.home-trust-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.home-trust-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #00a88f;
    text-decoration: none;
}

.home-trust-link:hover {
    text-decoration: underline;
}

/* How it works */
.home-how-title {
    text-align: center;
    font-size: 1.375rem;
    font-weight: 700;
    color: #374151;
    margin: 0 auto 2.75rem;
    max-width: 28rem;
    line-height: 1.3;
}

@media (min-width: 640px) {
    .home-how-title {
        font-size: 1.75rem;
        margin-bottom: 3.25rem;
        max-width: 36rem;
    }
}

.home-how-row {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2.75rem;
}

.home-how-row:last-of-type {
    margin-bottom: 0;
}

.home-how-row .home-how-visual {
    order: 1;
}

.home-how-row .home-how-copy {
    order: 2;
}

@media (min-width: 1024px) {
    .home-how-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 3rem;
        margin-bottom: 3.5rem;
    }

    .home-how-row--flip .home-how-visual {
        order: 2;
    }

    .home-how-row--flip .home-how-copy {
        order: 1;
    }
}

.home-how-visual {
    aspect-ratio: 4 / 3;
    max-height: 220px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.home-how-visual--teal {
    background: linear-gradient(160deg, #ccfbf1 0%, #5eead4 45%, #14b8a6 100%);
}

.home-how-visual--gold {
    background: linear-gradient(160deg, #fef3c7 0%, #fcd34d 50%, #d97706 100%);
}

.home-how-visual--sage {
    background: linear-gradient(160deg, #ecfccb 0%, #86efac 45%, #22c55e 100%);
}

.home-how-visual-icon {
    width: 4.5rem;
    height: 4.5rem;
    color: rgba(255, 255, 255, 0.95);
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.home-how-copy {
    text-align: left;
}

.home-how-copy h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem;
}

@media (min-width: 640px) {
    .home-how-copy h3 {
        font-size: 1.25rem;
    }
}

.home-how-copy p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #6b7280;
}

@media (min-width: 640px) {
    .home-how-copy p {
        font-size: 1rem;
    }
}

.home-how-cta-wrap {
    text-align: center;
    margin-top: 3rem;
}

@media (min-width: 1024px) {
    .home-how-cta-wrap {
        margin-top: 3.5rem;
    }
}

.home-how-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.25rem;
    background-color: #6db380;
    color: #fff !important;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    box-shadow: 0 4px 14px rgba(109, 179, 128, 0.35);
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.home-how-cta:hover {
    background-color: #5aa16c;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(109, 179, 128, 0.4);
}

/* Horizontal scroll for step bars without visible scrollbar */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* --- Responsive layout (home + global) --- */
@media (max-width: 639px) {
    .hero-bg {
        height: auto;
        min-height: 280px;
        padding-bottom: clamp(12rem, 42vw, 17rem);
    }

    .hero-overlap-card {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        width: auto;
        max-width: none;
        padding: 1.25rem 1rem;
        box-sizing: border-box;
    }

    .hero-overlap-card h1 {
        font-size: 1.25rem;
        line-height: 1.25;
    }

    .hero-overlap-card p {
        font-size: 13px;
        margin-bottom: 1rem;
    }

    .doc-chip {
        font-size: 12px;
        padding: 6px 12px;
        margin: 3px;
    }

    .main-search-container {
        margin-top: 1rem;
    }

    .main-search-input {
        height: 48px;
        font-size: 16px; /* avoid iOS zoom on focus */
    }

    .accomplish-section {
        padding: 2.5rem 0;
    }

    .accomplish-heading {
        font-size: 1.25rem;
    }

    .accomplish-grid {
        gap: 0.15rem 0;
        margin-top: 1.5rem;
    }

    .accomplish-item {
        padding: 0.4rem 0;
    }

    .accomplish-item-text {
        font-size: 15px;
    }

    .home-how-title {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }

    .home-how-visual {
        max-height: 180px;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .hero-bg {
        height: 420px;
    }

    .hero-overlap-card {
        top: 2rem;
        padding: 2rem;
    }

    .hero-overlap-card h1 {
        font-size: 1.625rem;
    }

    .accomplish-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Builder step footers: stack controls on narrow screens */
@media (max-width: 639px) {
    .builder-mode form div.flex:has(> button[type="submit"]) {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .builder-mode form div.flex:has(> button[type="submit"]) a.ml-6 {
        margin-left: 0 !important;
    }

    .builder-mode form div.flex:has(> button[type="submit"]) button[type="submit"] {
        width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .ld-toggle-btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    .group:hover .ld-toggle-btn,
    .ld-toggle-btn:hover,
    input:checked + .ld-toggle-btn,
    .ld-toggle-btn.active {
        padding: 9px 15px;
    }
}