/* Company Search Plugin Styles */

.cs-search-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

#cs-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#cs-search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

#cs-search-button {
    padding: 12px 24px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
}

#cs-search-button:hover {
    background-color: #005a87;
}

.cs-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cs-results-list li {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cs-view-details {
    background: none;
    border: none;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    padding: 0;
    margin: 0;
}

.cs-view-details:hover {
    color: #007cba;
}

.cs-results-list li div {
    color: #666;
    margin-top: 8px;
    font-size: 0.9em;
}

.cs-pagination {
    margin-top: 30px;
    text-align: center;
}

.cs-pagination a {
    margin: 0 8px;
    padding: 8px 12px;
    text-decoration: none;
    color: #007cba;
    border: 1px solid #007cba;
    border-radius: 4px;
}

.cs-pagination a.active {
    font-weight: bold;
    background-color: #007cba;
    color: white;
}

.cs-detail-view {
    margin-top: 20px;
}

.cs-back-to-results {
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.cs-back-to-results:hover {
    background-color: #e1e1e1;
}

.cs-detail-table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

.cs-detail-table th,
.cs-detail-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.cs-detail-table th {
    background: #f9f9f9;
    font-weight: bold;
    width: 30%;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cs-search-wrapper {
        padding: 10px;
    }

    #cs-search-form {
        flex-direction: column;
    }

    #cs-search-input {
        width: 100%;
        min-width: auto;
    }

    #cs-search-button {
        width: 100%;
        padding: 14px;
    }

    .cs-results-list li {
        padding: 15px;
    }

    .cs-view-details {
        font-size: 1.1em;
    }

    .cs-detail-table {
        font-size: 14px;
    }

    .cs-detail-table th,
    .cs-detail-table td {
        padding: 8px;
    }

    .cs-detail-table th {
        width: 40%;
    }

    /* Make table scrollable on mobile */
    .cs-detail-view {
        overflow-x: auto;
    }

    .cs-detail-table {
        min-width: 600px; /* Ensure table doesn't shrink too much */
    }
}

@media (max-width: 480px) {
    .cs-search-wrapper {
        padding: 5px;
    }

    .cs-results-list li {
        padding: 10px;
        margin-bottom: 10px;
    }

    .cs-view-details {
        font-size: 1em;
    }

    .cs-pagination a {
        margin: 0 4px;
        padding: 6px 10px;
        font-size: 14px;
    }

    .cs-detail-table {
        font-size: 12px;
    }

    .cs-detail-table th,
    .cs-detail-table td {
        padding: 6px;
    }
}