/* Link Building Tool — SnapWordz */
.lb-tool {
    --lb-pink: #fe5196;
    --lb-pink-dark: #ec311e;
    --lb-purple: #7c3aed;
    --lb-purple-dark: #5b21b6;
    --lb-purple-light: #9333ea;
    --lb-ink: #121212;
    --lb-muted: #6c6c6c;
    --lb-border: #e8e4ef;
    --lb-bg: #f8f6fc;
    --lb-card: #ffffff;
    --lb-radius: 14px;
    --lb-shadow: 0 8px 30px rgba(18, 18, 18, 0.06);
}

.lb-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.lb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--lb-border);
    color: var(--lb-muted);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.lb-form-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--lb-card);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    box-shadow: var(--lb-shadow);
    padding: 28px 28px 24px;
}

.lb-field {
    margin-bottom: 18px;
}

.lb-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--lb-ink);
    margin-bottom: 8px;
}

.lb-field .form-control,
.lb-field select:not(.lb-country-select) {
    width: 100%;
    min-height: 48px;
    border: 1.5px solid #ddd8ea;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--lb-ink);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lb-field .form-control:focus,
.lb-field select:not(.lb-country-select):focus {
    outline: none;
    border-color: var(--lb-pink);
    box-shadow: 0 0 0 3px rgba(254, 81, 150, 0.12);
}

.lb-field-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--lb-muted);
}

/* Select2 searchable country picker */
.lb-country-select.select2-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    min-height: 0 !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    overflow: hidden !important;
}

.lb-field .lb-country-select + .select2-container {
    display: block !important;
    width: 100% !important;
}

.lb-field .lb-country-select + .select2-container .selection {
    display: block !important;
    width: 100% !important;
}

.lb-tool .select2-container--default .select2-selection--single {
    position: relative;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    min-height: 48px;
    height: auto;
    border: 1.5px solid #ddd8ea;
    border-radius: 10px;
    padding: 10px 36px 10px 14px;
}

.lb-tool .select2-container--default .select2-selection--single .select2-selection__rendered {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    color: var(--lb-ink);
    font-size: 15px;
    line-height: 28px;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-tool .select2-container--default .select2-selection--single .select2-selection__arrow {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 20px;
    height: 20px;
    margin-top: -10px;
}

.lb-tool .select2-container--default.select2-container--open .select2-selection--single,
.lb-tool .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--lb-pink);
    box-shadow: 0 0 0 3px rgba(254, 81, 150, 0.15);
}

.lb-tool .select2-dropdown {
    border: 1px solid var(--lb-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(18, 18, 18, 0.12);
    overflow: hidden;
}

.lb-tool .select2-search--dropdown {
    padding: 10px;
}

.lb-tool .select2-search--dropdown .select2-search__field {
    border: 1.5px solid #ddd8ea;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
}

.lb-tool .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--lb-pink);
    outline: none;
}

.lb-tool .select2-results__option {
    padding: 8px 12px;
    font-size: 14px;
}

.lb-tool .select2-results__group {
    padding: 8px 12px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lb-pink-dark);
}

.lb-tool .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #fff1f6;
    color: #9d174d;
}

.lb-field select optgroup {
    font-weight: 700;
    color: var(--lb-purple-dark);
}

.lb-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.lb-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1.5px solid #ebe6f7;
    background: linear-gradient(180deg, #fffdfb 0%, #fff 100%);
    cursor: pointer;
    margin-bottom: 18px;
}

.lb-toggle input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--lb-pink);
}

.lb-toggle-text strong {
    display: block;
    font-size: 14px;
    color: var(--lb-ink);
    margin-bottom: 4px;
}

.lb-toggle-text span {
    font-size: 13px;
    color: var(--lb-muted);
    line-height: 1.45;
}

.lb-captcha {
    display: flex;
    justify-content: center;
    margin: 8px 0 18px;
}

.lb-submit-wrap {
    text-align: center;
}

.lb-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 260px;
    min-height: 52px;
    padding: 14px 32px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 55%, #9333ea 100%);
    color: #fff !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.38);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.lb-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.45);
}

.lb-btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
}

.lb-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.22);
}

.lb-loader {
    display: none;
    text-align: center;
    padding: 16px 0 4px;
}

.lb-loader.active {
    display: block;
}

.lb-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid #ede9fe;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: lb-spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

.lb-loader p {
    font-size: 14px;
    color: var(--lb-muted);
    margin: 0;
}

@keyframes lb-spin {
    to { transform: rotate(360deg); }
}

#msg.lb-results {
    display: none;
    max-width: 980px;
    margin: 28px auto 0;
    text-align: left;
}

#msg.lb-results.active {
    display: block;
    animation: lb-fade-in 0.35s ease;
}

@keyframes lb-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Results */
.lb-wrap {
    text-align: left;
}

.lb-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.lb-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--lb-border);
    font-size: 13px;
    color: var(--lb-ink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.lb-chip b {
    color: var(--lb-muted);
    font-weight: 600;
}

.lb-group {
    margin-bottom: 20px;
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(18, 18, 18, 0.04);
}

.lb-group-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #fff7fb 0%, #f9f6ff 100%);
    border-bottom: 1px solid var(--lb-border);
}

.lb-group-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid rgba(124, 58, 237, 0.35);
    color: var(--lb-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.12);
}

.lb-group-head > div:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.lb-group-head h4 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--lb-ink);
}

.lb-group-head p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--lb-muted);
}

.lb-group-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--lb-purple);
    background: rgba(124, 58, 237, 0.1);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.lb-query-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lb-query-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f1edf8;
}

.lb-query-item:last-child {
    border-bottom: 0;
}

.lb-query-text {
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: 13px;
    line-height: 1.55;
    color: #2d2640;
    word-break: break-word;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--lb-bg);
    border-radius: 8px;
    border: 1px dashed #e3ddf0;
}

.lb-query-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.lb-btn:hover {
    transform: translateY(-1px);
}

.lb-btn-google {
    background: linear-gradient(135deg, var(--lb-purple-dark) 0%, var(--lb-purple) 55%, var(--lb-purple-light) 100%);
    color: #fff !important;
    border: 1px solid rgba(91, 33, 182, 0.35);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.lb-btn-google:hover {
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

.lb-btn-copy {
    background: #fff;
    color: var(--lb-ink) !important;
    border: 1.5px solid #c8bfd9;
    box-shadow: 0 1px 4px rgba(18, 18, 18, 0.06);
}

.lb-btn-copy.copied {
    border-color: #10b981;
    color: #047857;
}

.lb-live {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
}

.lb-live-ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.lb-live-fail {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.lb-live-list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.lb-live-list li {
    margin-bottom: 6px;
    padding-left: 14px;
    position: relative;
}

.lb-live-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #059669;
}

.lb-live-list a {
    color: #065f46;
    text-decoration: none;
    font-weight: 500;
}

.lb-live-list a:hover {
    text-decoration: underline;
}

.lb-note {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--lb-bg);
    font-size: 13px;
    color: var(--lb-muted);
    line-height: 1.55;
}

.lb-alert {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: #fff5f8;
    border: 1px solid #ffd6e8;
    color: var(--lb-ink);
}

@media (max-width: 767px) {
    .lb-form-card {
        padding: 20px 16px;
    }

    .lb-grid-2 {
        grid-template-columns: 1fr;
    }

    .lb-group-head {
        flex-wrap: wrap;
    }

    .lb-group-count {
        margin-left: 0;
    }
}

/* Content sections below the tool */
.lb-content {
    padding: 10px 0 60px;
    background: #fff;
}

.lb-content-block {
    margin-bottom: 42px;
}

.lb-content-block h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--lb-ink);
    margin-bottom: 16px;
    line-height: 1.3;
}

.lb-content-block h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--lb-ink);
    margin: 0 0 8px;
}

.lb-content-block p {
    font-size: 15px;
    line-height: 1.75;
    color: #3a3a3a;
    margin-bottom: 14px;
}

.lb-content-block p:last-child {
    margin-bottom: 0;
}

.lb-content-block a {
    color: var(--lb-purple);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lb-content-block a:hover {
    color: var(--lb-purple-dark);
}

.lb-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lb-checklist li {
    position: relative;
    padding: 10px 0 10px 28px;
    font-size: 15px;
    line-height: 1.65;
    color: #3a3a3a;
    border-bottom: 1px solid #f3f0f8;
}

.lb-checklist li:last-child {
    border-bottom: 0;
}

.lb-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.12);
    color: var(--lb-purple);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-steps {
    margin: 0 0 16px;
    padding-left: 22px;
}

.lb-steps li {
    font-size: 15px;
    line-height: 1.7;
    color: #3a3a3a;
    margin-bottom: 10px;
}

.lb-strategy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.lb-strategy-card {
    padding: 20px;
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    background: var(--lb-bg);
    transition: box-shadow 0.2s;
}

.lb-strategy-card:hover {
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}

.lb-strategy-icon {
    font-size: 26px;
    display: block;
    margin-bottom: 10px;
}

.lb-strategy-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--lb-muted);
    margin: 0;
}

.lb-operator-table-wrap {
    overflow-x: auto;
    margin: 18px 0;
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
}

.lb-operator-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.lb-operator-table th,
.lb-operator-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f1edf8;
}

.lb-operator-table th {
    background: var(--lb-bg);
    font-weight: 600;
    color: var(--lb-ink);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lb-operator-table td {
    color: #3a3a3a;
    vertical-align: top;
}

.lb-operator-table tr:last-child td {
    border-bottom: 0;
}

.lb-operator-table code {
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: 12.5px;
    background: #f3f0f8;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--lb-purple-dark);
    white-space: nowrap;
}

.lb-faq-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--lb-border);
}

.lb-faq-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.lb-faq-item p {
    margin: 0;
}

@media (max-width: 767px) {
    .lb-strategy-grid {
        grid-template-columns: 1fr;
    }

    .lb-content-block h2 {
        font-size: 21px;
    }
}
