/* Base Container Styles */
.wp-org-search-container {
    max-width: 1400px;
    margin: 0 auto;
    /* padding: 0 20px; */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

    background-color: #8EC5FC;
    background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);

    /* background: linear-gradient(135deg, #6e48aa 0%, #9d50bb 100%); */
    padding: 30px;
}

/* Search Form Styling */
.search-input-group {
    display: flex;
    /* margin-bottom: 30px; */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* border-radius: 8px; */
    overflow: hidden;
}

.wp-org-search-type {
    padding: 12px 15px;
    border: none;
    /* background: linear-gradient(135deg, #6e48aa 0%, #9d50bb 100%);
    color: white; */
    font-weight: 500;
    cursor: pointer;
    min-width: 120px;
    /* appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px; */
    margin-right: 20px;
}

.wp-org-search-input {
    /* flex: 1; */
    padding: 12px 20px;
    border: none;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    margin-right: 20px;
}

.wp-org-search-input:focus {
    background: white;
    outline: none;
}

.wp-org-search-button {
    padding: 0 25px;
    background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wp-org-search-button:hover {
    background: linear-gradient(135deg, #3a64d1 0%, #7d48d1 100%);
}

/* Results Grid Layout */
.wp-org-search-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

@media (min-width: 600px) {
    .wp-org-search-results {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (min-width: 900px) {
    .wp-org-search-results {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .wp-org-search-results {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Base Card Styles */
.plugin-result, 
.theme-result, 
.author-result {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.plugin-result:hover, 
.theme-result:hover, 
.author-result:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

/* Plugin Card Specific Styles */
.plugin-result {
    border-top: 4px solid #4b7bec;
}

.plugin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.plugin-header h3 {
    margin: 0;
    color: #2d3436;
    font-size: 14px;
    line-height: 1.3;
}

.plugin-header h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.plugin-header h3 a:hover {
    color: #4b7bec;
}

.plugin-version {
    background: #f1f3fe;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    color: #4b7bec;
}

.plugin-description {
    color: #636e72;
    margin-bottom: 15px;
    font-size: 0.9em;
    line-height: 1.5;
}

.plugin-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #636e72;
    border-top: 1px solid #f1f3fe;
    padding-top: 12px;
    margin-top: 12px;
}

.plugin-rating {
    color: #f39c12;
    font-weight: 600;
}

.plugin-downloaded {
    color: #00b894;
    font-weight: 600;
}

/* Theme Card Specific Styles */
.theme-result {
    border-top: 4px solid #fd79a8;
    display: flex;
    flex-direction: column;
}

.theme-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.theme-header h3 {
    margin: 0;
    color: #2d3436;
    font-size: 14px;
    line-height: 1.3;
}

.theme-header h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.theme-header h3 a:hover {
    color: #fd79a8;
}

.theme-version {
    background: #feeff5;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    color: #fd79a8;
}

.theme-screenshot {
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    align-self: center;
}

.theme-screenshot img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.theme-result:hover .theme-screenshot img {
    transform: scale(1.03);
}

.theme-description {
    color: #636e72;
    margin-bottom: 15px;
    font-size: 0.9em;
    line-height: 1.5;
    flex-grow: 1;
}

.theme-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85em;
    color: #636e72;
    border-top: 1px solid #feeff5;
    padding-top: 12px;
    margin-top: 12px;
}

.theme-rating {
    color: #f39c12;
    font-weight: 600;
}

.theme-downloaded {
    color: #00b894;
    font-weight: 600;
}

.theme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.theme-tag {
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    color: #636e72;
    transition: all 0.2s ease;
}

.theme-tag:hover {
    background: #fd79a8;
    color: white;
}

/* Author Card Specific Styles */
.author-result {
    border-top: 4px solid #00b894;
    display: flex;
    flex-direction: column;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.author-avatar {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 3px solid #f1f3fe;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.author-header h3 {
    margin: 0;
    color: #2d3436;
    font-size: 14px;
    line-height: 1.3;
}

.author-header h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-header h3 a:hover {
    color: #00b894;
}

.author-username {
    display: inline-block;
    background: #e8f7f2;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    margin-bottom: 10px;
    color: #00b894;
    font-weight: 600;
}

.author-description {
    color: #636e72;
    margin-bottom: 15px;
    font-size: 0.9em;
    line-height: 1.5;
    flex-grow: 1;
}

.author-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #636e72;
    border-top: 1px solid #e8f7f2;
    padding-top: 12px;
    margin-top: 12px;
}

.author-plugins,
.author-themes {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.author-plugins:before {
    content: "🧩";
}

.author-themes:before {
    content: "🎨";
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .search-input-group {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .wp-org-search-type {
        border-radius: 8px 8px 0 0;
        min-width: auto;
        background-position: right 15px center;
    }
    
    .wp-org-search-input {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .wp-org-search-button {
        border-radius: 0 0 8px 8px;
        padding: 12px;
    }
    
    .author-header {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin-bottom: 10px;
    }
}

/* No Results Message */
.wp-org-search-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #636e72;
    font-size: 1.1em;
}

/* Loading Animation */
.wp-org-search-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #636e72;
}

.wp-org-search-loading:after {
    content: "...";
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}