/* Rank & Rent Directory Plugin Styles */

/* Search Form */
.rrd-search-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #ddd;
}

.rrd-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.rrd-search-field {
    flex: 1;
    min-width: 200px;
}

.rrd-search-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.rrd-search-field input,
.rrd-search-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.rrd-search-field button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 14px;
}

.rrd-search-field button:hover {
    background: #005a87;
}

#rrd-clear-search {
    background: #666 !important;
}

#rrd-clear-search:hover {
    background: #444 !important;
}

/* Directory Listings */
.rrd-directory-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rrd-listing-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.rrd-listing-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.rrd-featured-card {
    border: 2px solid #ffaa00;
    box-shadow: 0 2px 8px rgba(255,170,0,0.2);
}

.rrd-featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffaa00;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.rrd-card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.rrd-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rrd-card-image:hover img {
    transform: scale(1.05);
}

.rrd-card-content {
    padding: 20px;
}

.rrd-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.rrd-card-title a {
    color: #333;
    text-decoration: none;
}

.rrd-card-title a:hover {
    color: #0073aa;
}

.rrd-rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.rrd-stars {
    color: #ffaa00;
    font-size: 16px;
    margin-right: 5px;
}

.rrd-rating-number {
    font-size: 14px;
    color: #666;
}

.rrd-categories {
    margin-bottom: 10px;
}

.rrd-category-tag {
    display: inline-block;
    background: #e1f5fe;
    color: #0277bd;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.rrd-address {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.rrd-icon {
    margin-right: 5px;
}

.rrd-price-range {
    margin-bottom: 10px;
}

.rrd-price {
    font-weight: bold;
    color: #27ae60;
    font-size: 16px;
}

.rrd-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
    max-height: 60px;
    overflow: hidden;
}

.rrd-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rrd-btn {
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.rrd-btn-primary {
    background: #0073aa;
    color: white;
}

.rrd-btn-primary:hover {
    background: #005a87;
    color: white;
}

.rrd-btn-secondary {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ccc;
}

.rrd-btn-secondary:hover {
    background: #e1e1e1;
    color: #333;
}

/* Featured Listings */
.rrd-featured-listings {
    margin-bottom: 30px;
}

.rrd-columns-1 .rrd-listing-card {
    max-width: 100%;
}

.rrd-columns-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.rrd-columns-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rrd-columns-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Search Results */
.rrd-search-results {
    margin-top: 20px;
}

.rrd-search-results-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.rrd-no-results {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

/* Pagination */
.rrd-pagination {
    text-align: center;
    margin-top: 30px;
}

.rrd-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.rrd-pagination .page-numbers:hover,
.rrd-pagination .page-numbers.current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.rrd-page-btn {
    background: #f1f1f1;
    border: 1px solid #ccc;
    padding: 8px 12px;
    margin: 0 2px;
    cursor: pointer;
    border-radius: 4px;
}

.rrd-page-btn:hover,
.rrd-page-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Single Listing Page */
.rrd-single-listing {
    max-width: 800px;
}

.rrd-listing-header {
    margin-bottom: 30px;
}

.rrd-listing-gallery {
    margin-bottom: 30px;
}

.rrd-listing-info {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.rrd-listing-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.rrd-listing-sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    height: fit-content;
}

.rrd-contact-info {
    margin-bottom: 20px;
}

.rrd-contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
}

.rrd-contact-item .rrd-icon {
    margin-right: 10px;
    width: 20px;
}

/* Reviews */
.rrd-reviews {
    margin-top: 30px;
}

.rrd-review-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.rrd-review-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.rrd-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rrd-review-author {
    font-weight: bold;
}

.rrd-review-date {
    color: #666;
    font-size: 12px;
}

/* Loading States */
.rrd-loading {
    text-align: center;
    padding: 40px;
}

.rrd-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .rrd-search-row {
        flex-direction: column;
    }
    
    .rrd-search-field {
        min-width: 100%;
    }
    
    .rrd-directory-listings {
        grid-template-columns: 1fr;
    }
    
    .rrd-columns-2,
    .rrd-columns-3,
    .rrd-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .rrd-listing-info {
        grid-template-columns: 1fr;
    }
    
    .rrd-card-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .rrd-search-form {
        padding: 15px;
    }
    
    .rrd-card-content {
        padding: 15px;
    }
    
    .rrd-listing-content,
    .rrd-listing-sidebar {
        padding: 15px;
    }
}