/* Wrapper */
.sjd-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Search Bar */
.sjd-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
}
.sjd-search-bar input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.sjd-search-bar select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.sjd-search-bar button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Grid Layout (Directory) */
.sjd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Cards (Directory) */
.sjd-card {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}
.sjd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Sponsored Styling (Directory) */
.sjd-card.sjd-sponsored {
    border: 2px solid #ffd700;
    background: #fffdf5;
}
.sjd-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffd700;
    color: #000;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 20px;
    z-index: 10;
}

.sjd-card-img {
    height: 180px;
    background: #eee;
    overflow: hidden;
}
.sjd-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sjd-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ccc"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8 8 8z"/><path d="M0 0h24v24H0z" fill="none"/></svg>') no-repeat center center;
    background-size: 50px;
}

.sjd-card-body {
    padding: 15px;
    flex-grow: 1;
}
.sjd-card-body h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}
.sjd-card-body h3 a {
    text-decoration: none;
    color: #333;
}
.sjd-rating {
    color: #f39c12;
    margin-bottom: 10px;
    font-size: 14px;
}
.sjd-excerpt {
    font-size: 0.9rem;
    color: #666;
}

/* Dashboard Table */
.sjd-dashboard table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.sjd-dashboard th, .sjd-dashboard td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}
.sjd-dashboard th {
    background: #f9f9f9;
}
.button-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Forms */
.sjd-form-wrapper {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 30px;
}
.sjd-form label {
    font-weight: bold;
}
.sjd-form input, .sjd-form textarea, .sjd-form select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Claim Button */
.sjd-claim-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}
.sjd-claim-btn:hover {
    background: #c0392b;
}

/* Success Message */
.sjd-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

/* =========================================
   Best In Category Layout (Clutch Style)
   ========================================= */
.sjd-best-list {
    max-width: 1000px;
    margin: 0 auto;
}
.sjd-rank-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.sjd-best-card {
    display: flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    align-items: flex-start;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.sjd-best-sponsored {
    border: 2px solid #ffd700;
    background: #fffdf9;
}
.sjd-best-rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ccc;
    margin-right: 20px;
    min-width: 30px;
}
.sjd-best-content-wrapper {
    display: flex;
    flex-grow: 1;
    gap: 20px;
    flex-wrap: wrap;
}
.sjd-best-logo {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border: 1px solid #eee;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sjd-best-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.sjd-placeholder-small {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}
.sjd-best-info {
    flex-grow: 1;
    min-width: 250px;
}
.sjd-best-title {
    margin: 0 0 5px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sjd-best-title a {
    text-decoration: none;
    color: #333;
}
.sjd-badge-inline {
    font-size: 0.7rem;
    background: #ffd700;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
.sjd-best-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}
.sjd-best-stars {
    color: #f39c12;
    letter-spacing: 2px;
}
.sjd-best-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 10px;
}
.sjd-best-address {
    font-size: 0.85rem;
    color: #888;
}
.sjd-best-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 150px;
}
.sjd-btn-web, .sjd-btn-profile {
    display: block;
    text-align: center;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}
.sjd-btn-web {
    background: #0073aa;
    color: #fff;
}
.sjd-btn-web:hover {
    background: #005177;
    color: #fff;
}
.sjd-btn-profile {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}
.sjd-btn-profile:hover {
    background: #e0e0e0;
}

/* Pagination */
.sjd-pagination {
    margin-top: 30px;
    text-align: center;
}
.sjd-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}
.sjd-pagination .page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Review Rating in Comment */
.sjd-review-rating {
    display: block;
    margin-bottom: 0.5em;
    font-size: 1.1em;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sjd-search-bar {
        flex-direction: column;
    }
    .sjd-search-bar input,
    .sjd-search-bar select,
    .sjd-search-bar button {
        width: 100%;
    }
    .sjd-best-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .sjd-best-logo {
        margin-bottom: 15px;
    }
    .sjd-best-actions {
        width: 100%;
        margin-top: 15px;
    }
    .sjd-best-meta-row {
        justify-content: center;
    }
    .sjd-best-title {
        flex-direction: column;
        justify-content: center;
    }
}