/* ============================================
   WDB Service Card - Components
   Badge, Separator, Features, Counter,
   Title Highlight, Description, Background
   ============================================ */

/* ---- Title Highlight ---- */
.wdb-title-highlight {
    position: relative;
    display: inline;
}

.wdb-highlight-underline {
    text-decoration: none;
    background-image: linear-gradient(var(--wdb-highlight-color, #f59e0b), var(--wdb-highlight-color, #f59e0b));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 100% var(--wdb-highlight-thickness, 3px);
    padding-bottom: 2px;
}

.wdb-highlight-background {
    padding: 2px 6px;
    border-radius: 4px;
}

.wdb-highlight-circle {
    position: relative;
}
.wdb-highlight-circle::before {
    content: '';
    position: absolute;
    inset: -4px -8px;
    border: 2px solid var(--wdb-highlight-color, #f59e0b);
    border-radius: 50%;
    opacity: 0.6;
}

.wdb-highlight-strikethrough {
    position: relative;
}
.wdb-highlight-strikethrough::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: var(--wdb-highlight-color, #f59e0b);
    opacity: 0.7;
}

/* ---- Description ---- */
.wdb-card-description-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.wdb-desc-inline-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}
.wdb-desc-inline-icon i {
    font-size: 14px;
}
.wdb-desc-inline-icon svg {
    width: 14px;
    height: 14px;
}

.wdb-line-clamp {
    display: -webkit-box;
    -webkit-line-clamp: var(--wdb-clamp, 3);
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Badge ---- */
.wdb-card-badge {
    position: absolute;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.wdb-badge-top-left { top: 12px; left: 12px; }
.wdb-badge-top-right { top: 12px; right: 12px; }
.wdb-badge-bottom-left { bottom: 12px; left: 12px; }
.wdb-badge-bottom-right { bottom: 12px; right: 12px; }

.wdb-badge-small { font-size: 10px; padding: 4px 8px; }
.wdb-badge-small i, .wdb-badge-small svg { font-size: 10px; width: 10px; height: 10px; }
.wdb-badge-medium { font-size: 12px; padding: 5px 12px; }
.wdb-badge-medium i, .wdb-badge-medium svg { font-size: 12px; width: 12px; height: 12px; }
.wdb-badge-large { font-size: 14px; padding: 6px 16px; }
.wdb-badge-large i, .wdb-badge-large svg { font-size: 14px; width: 14px; height: 14px; }

/* ---- Separator ---- */
.wdb-card-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.wdb-card-separator span {
    display: block;
    border-top-style: solid;
    border-top-color: rgba(255, 255, 255, 0.1);
}

.wdb-separator-dashed span { border-top-style: dashed; }
.wdb-separator-dotted span { border-top-style: dotted; }

.wdb-separator-double span {
    border-top-style: double;
    border-top-width: 4px;
}

.wdb-separator-gradient span {
    border: none;
    height: 1px;
}

.wdb-separator-icon {
    gap: 8px;
}
.wdb-separator-icon i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
}
.wdb-separator-icon svg {
    width: 14px;
    height: 14px;
    fill: rgba(255, 255, 255, 0.3);
}

/* ---- Features List ---- */
.wdb-card-features {
    width: 100%;
}

.wdb-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.wdb-features-cols-1 .wdb-features-list { grid-template-columns: 1fr; }
.wdb-features-cols-2 .wdb-features-list { grid-template-columns: 1fr 1fr; }
.wdb-features-cols-3 .wdb-features-list { grid-template-columns: 1fr 1fr 1fr; }

.wdb-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: opacity 0.3s ease;
}

.wdb-feature-inactive {
    opacity: 0.4;
}
.wdb-feature-inactive .wdb-feature-text {
    text-decoration: line-through;
}

.wdb-feature-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wdb-feature-icon img {
    object-fit: contain;
}

.wdb-feature-text {
    font-size: 14px;
    line-height: 1.4;
}

.wdb-feature-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: help;
    flex-shrink: 0;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.wdb-feature-tooltip-trigger:hover {
    color: #f59e0b;
    border-color: #f59e0b;
}

/* ---- Glassmorphism: Badge ---- */
.wdb-badge-glass {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ---- Glassmorphism: Counters ---- */
.wdb-counters-glass .wdb-card-counter {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ---- Glassmorphism: Feature Items ---- */
.wdb-feature-glass {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    padding: 8px 12px;
}

/* Tooltip */
.wdb-tooltip {
    position: absolute;
    z-index: 100;
    background: #1a1a2e;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    max-width: 220px;
    white-space: normal;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.wdb-tooltip.wdb-tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}

.wdb-tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1a1a2e;
}

/* ---- Counter ---- */
.wdb-card-counters-wrap {
    display: flex;
    width: 100%;
}

.wdb-counters-dual {
    gap: 24px;
}

.wdb-counters-dual .wdb-card-counter {
    flex: 1;
    min-width: 0;
}

.wdb-counters-bordered .wdb-card-counter {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 16px 20px;
}

.wdb-card-counter {
    display: flex;
    align-items: baseline;
    gap: 2px;
    flex-wrap: wrap;
}

.wdb-counter-number {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.wdb-counter-prefix,
.wdb-counter-suffix {
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
}

.wdb-counter-label {
    width: 100%;
    font-size: 14px;
    margin-top: 4px;
}

/* ---- Micro-Badge ---- */
.wdb-micro-badge {
    position: absolute;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    border-radius: 4px;
    line-height: 1;
    white-space: nowrap;
}

.wdb-micro-top-left { top: 12px; left: 12px; }
.wdb-micro-top-right { top: 12px; right: 12px; }
.wdb-micro-bottom-left { bottom: 12px; left: 12px; }
.wdb-micro-bottom-right { bottom: 12px; right: 12px; }

/* ---- Before / After ---- */
.wdb-card-before-after {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.wdb-ba-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    flex: 1;
    transition: all 0.3s ease;
}

.wdb-ba-item i, .wdb-ba-item svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.wdb-ba-before {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.wdb-ba-after {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.wdb-ba-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    flex-shrink: 0;
}

/* ---- Background Image Layer ---- */
.wdb-card-bg-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: inherit;
}

.wdb-card-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* ---- Card-mode Image ---- */
.wdb-card-mode-image {
    width: 100%;
    overflow: hidden;
    border-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin: -32px -28px 24px -28px;
    width: calc(100% + 56px);
}

.wdb-card-mode-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ---- Media Types ---- */
.wdb-card-media {
    width: 100%;
}

.wdb-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wdb-card-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

.wdb-card-lottie {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wdb-card-lottie canvas,
.wdb-card-lottie svg {
    width: 100% !important;
    height: 100% !important;
}
