/* ═══════════════════════════════════════════════
   DigiTusWay Contractors Widget
   ═══════════════════════════════════════════════ */

/* ── Outer layout ── */
.dw-wrapper { width: 100%; box-sizing: border-box; }
.dw-inner   { display: flex; gap: 24px; align-items: flex-start; }

/* ════════════════
   SIDEBAR
════════════════ */
.dw-sidebar {
    flex: 0 0 250px;
    width: 250px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 16px;
    box-sizing: border-box;
    position: sticky;
    top: 20px;
}

.dw-sidebar-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #9ca3af;
    margin: 0 0 8px;
}

/* Category items */
.dw-cats { display: flex; flex-direction: column; gap: 1px; margin-bottom: 18px; }

.dw-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13.5px;
    color: #374151;
    transition: background .15s, color .15s;
    user-select: none;
}
.dw-cat-item:hover { background: #f3f4f6; }

.dw-cat-item.dw-active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}
.dw-cat-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: .65; }
.dw-cat-item.dw-active .dw-cat-icon { opacity: 1; }
.dw-cat-label { flex: 1; line-height: 1.3; }
.dw-cat-count {
    font-size: 11.5px;
    font-weight: 600;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 18px;
    text-align: center;
}
.dw-cat-item.dw-active .dw-cat-count { background: #dbeafe; color: #1d4ed8; }

/* Divider */
.dw-divider { border: none; border-top: 1px solid #f3f4f6; margin: 14px 0; }

/* Location */
.dw-location-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    margin-bottom: 14px;
    cursor: pointer;
}
.dw-location-select:focus { outline: none; border-color: #93c5fd; }

/* Rating */
.dw-rating-options { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.dw-rating-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}
.dw-rating-row input[type="checkbox"] { accent-color: #1d4ed8; width: 14px; height: 14px; cursor: pointer; }
.dw-rating-stars .dw-star-on  { color: #f59e0b; }
.dw-rating-stars .dw-star-off { color: #d1d5db; }
.dw-rating-text { color: #6b7280; font-size: 12px; }

/* Clear link */
.dw-sidebar-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: color .15s;
}
.dw-sidebar-clear:hover { color: #374151; }

/* ════════════════
   CONTENT
════════════════ */
.dw-content { flex: 1; min-width: 0; }

.dw-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.dw-results-count { font-size: 13.5px; font-weight: 700; color: #111827; }

.dw-sort-wrap { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; }
.dw-sort-select {
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    cursor: pointer;
}

/* Loading */
.dw-posts-area { position: relative; min-height: 60px; }
.dw-posts-area.dw-loading::after {
    content: '';
    position: absolute; left: 50%; top: 60px;
    transform: translateX(-50%);
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
    border-top-color: #1d4ed8;
    animation: dw-spin .8s linear infinite;
    z-index: 10;
}
@keyframes dw-spin {
    from { transform: translateX(-50%) rotate(0deg); }
    to   { transform: translateX(-50%) rotate(360deg); }
}

/* ════════════════
   CARD LIST
════════════════ */
.dw-grid { display: flex; flex-direction: column; gap: 12px; }

.dw-card-link { display: block; text-decoration: none; color: inherit; }

.dw-card {
    display: flex;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    /* NO box-shadow on idle */
    transition: box-shadow .2s ease, border-color .2s ease;
}
.dw-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    border-color: #d1d5db;
}

/* Photo — left panel, NO scale, NO transform */
.dw-card-photo {
    flex: 0 0 200px;
    width: 200px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}
.dw-card-photo img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    display: block;
    /* absolutely no transform or transition on this element */
}
.dw-card-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #f3f4f6;
}

/* Body */
.dw-card-body {
    flex: 1;
    padding: 16px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

/* Row 1: title + badge */
.dw-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.dw-card-title {
    font-size: 15.5px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}
.dw-badge-response {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #16a34a;
    white-space: nowrap;
    flex-shrink: 0;
}
.dw-badge-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #16a34a;
}

/* Row 2: logo + service */
.dw-card-service-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dw-card-logo {
    width: 44px; height: 44px;
    border-radius: 7px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    flex-shrink: 0;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dw-card-logo img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 3px;
}
.dw-card-logo-initials {
    width: 44px; height: 44px;
    border-radius: 7px;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; font-weight: 700;
    flex-shrink: 0;
}
.dw-card-service {
    font-size: 13px;
    color: #6b7280;
}

/* Row 3: rating */
.dw-card-rating { display: flex; align-items: center; gap: 6px; }
.dw-stars { font-size: 13px; letter-spacing: 1px; }
.dw-star-on   { color: #f59e0b; }
.dw-star-half { color: #f59e0b; opacity: .5; }
.dw-star-off  { color: #d1d5db; }
.dw-rating-score { font-size: 13px; font-weight: 700; color: #111827; }
.dw-rating-count { font-size: 12px; color: #9ca3af; }

/* Row 4: meta */
.dw-card-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.dw-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    color: #6b7280;
}
.dw-meta-icon { flex-shrink: 0; opacity: .8; }

/* Row 5: tags */
.dw-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dw-tag {
    padding: 3px 10px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.dw-tag-extra { color: #9ca3af; background: #f9fafb; }

/* Row 6: footer */
.dw-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}
.dw-btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background: #fff;
    transition: border-color .15s, color .15s;
    cursor: pointer;
}
.dw-btn-contact:hover { border-color: #9ca3af; }
.dw-btn-profile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #e8791d;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    transition: background .15s;
    cursor: pointer;
}
.dw-btn-profile:hover { background: #c96918; }

/* No posts */
.dw-no-posts {
    padding: 40px;
    text-align: center;
    color: #9ca3af;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

/* Load more */
.dw-load-more-wrap { text-align: center; margin-top: 20px; }
.dw-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    background: #fff;
    border: 1.5px solid #1d4ed8;
    border-radius: 8px;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.dw-load-more:hover { background: #1d4ed8; color: #fff; }
.dw-load-more:disabled { opacity: .45; cursor: not-allowed; }

/* ════════════════
   RESPONSIVE
════════════════ */
@media (max-width: 1024px) {
    .dw-inner { flex-direction: column; }
    .dw-sidebar { width: 100%; flex: none; position: static; }
    .dw-cats { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .dw-cat-item {
        padding: 5px 12px;
        border: 1.5px solid #e5e7eb;
        border-radius: 20px;
        gap: 6px;
    }
    .dw-cat-item.dw-active { border-color: #1d4ed8; }
    .dw-divider,
    .dw-location-select,
    .dw-rating-options,
    .dw-sidebar-clear,
    .dw-sidebar-label + .dw-rating-options { display: none; }
    .dw-sidebar-label:not(:first-child) { display: none; }
}

@media (max-width: 680px) {
    .dw-card-photo { flex: 0 0 120px; width: 120px; }
    .dw-card-photo img { min-height: 160px; }
    .dw-card-body { padding: 12px 12px 10px; gap: 7px; }
    .dw-badge-response { display: none; }
    .dw-btn-contact { display: none; }
    .dw-card-title { font-size: 14px; }
}

@media (max-width: 480px) {
    .dw-card { flex-direction: column; }
    .dw-card-photo { width: 100%; flex: none; }
    .dw-card-photo img { min-height: 180px; }
}

/* ═══════════════════════════════════════════════════
   DW Hero Search Shortcode
   ═══════════════════════════════════════════════════ */

.dw-hs-wrap {
	background: #fff;
	border-radius: 16px;
	padding: 30px 30px 26px;
	box-shadow: 0 20px 60px rgba(0,0,0,.22), 0 4px 16px rgba(0,0,0,.10);
	max-width: 500px;
	width: 100%;
	box-sizing: border-box;
	position: relative;
}

/* Subtle top accent line */
.dw-hs-wrap::before {
	content: '';
	position: absolute;
	top: 0; left: 24px; right: 24px;
	height: 3px;
	background: linear-gradient(90deg, #e8791d, #f59e0b);
	border-radius: 0 0 4px 4px;
}

.dw-hs-title {
	font-size: 18px;
	font-weight: 800;
	color: #111827;
	margin: 0 0 18px;
	letter-spacing: -.3px;
	line-height: 1.2;
}

/* ── Input row ── */
.dw-hs-form { margin: 0; }

.dw-hs-input-row {
	display: flex;
	align-items: center;
	border: 1.5px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	background: #f9fafb;
	transition: border-color .2s, box-shadow .2s;
}
.dw-hs-input-row:focus-within {
	border-color: #e8791d;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(232,121,29,.10);
}

.dw-hs-search-icon {
	padding: 0 10px 0 14px;
	color: #9ca3af;
	display: flex;
	align-items: center;
	flex-shrink: 0;
	transition: color .2s;
}
.dw-hs-input-row:focus-within .dw-hs-search-icon { color: #e8791d; }

.dw-hs-input {
	flex: 1;
	border: none;
	background: transparent;
	outline: none;
	font-size: 14px;
	color: #111827;
	padding: 13px 8px 13px 0;
	min-width: 0;
}
.dw-hs-input::placeholder { color: #9ca3af; font-size: 13.5px; }

.dw-hs-btn {
	background: #e8791d;
	color: #fff;
	border: none;
	padding: 0 22px;
	height: 48px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	letter-spacing: .2px;
	transition: background .15s, transform .1s;
}
.dw-hs-btn:hover { background: #c96918; }
.dw-hs-btn:active { transform: scale(.98); }

/* ── Popular pills ── */
.dw-hs-popular { margin-top: 18px; }

.dw-hs-popular-label {
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #9ca3af;
	margin-bottom: 10px;
}

.dw-hs-popular-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.dw-hs-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 13px;
	background: #f3f4f6;
	color: #374151;
	border: 1.5px solid #e5e7eb;
	border-radius: 20px;
	font-size: 12.5px;
	font-weight: 500;
	text-decoration: none;
	transition: background .15s, color .15s, border-color .15s;
	white-space: nowrap;
}
.dw-hs-pill:hover {
	background: #fff4ec;
	color: #e8791d;
	border-color: #e8791d;
}
.dw-hs-pill::before {
	content: '';
	width: 5px; height: 5px;
	border-radius: 50%;
	background: #d1d5db;
	transition: background .15s;
}
.dw-hs-pill:hover::before { background: #e8791d; }

/* ── Responsive ── */
@media (max-width: 540px) {
	.dw-hs-wrap { padding: 22px 18px 20px; border-radius: 12px; }
	.dw-hs-title { font-size: 16px; }
	.dw-hs-btn { padding: 0 16px; font-size: 13px; }
}
