/**
 * Business Finder - Styles
 * Clean, minimal styling for the search interface
 */

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 20px;
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* Header */
h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

/* Search form */
.search-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

/* Form groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #444;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
}

/* Status text under inputs */
.status-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.status-text.success {
    color: #28a745;
}

.status-text.error {
    color: #dc3545;
}

/* Filters row */
.filters-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .filters-row {
        grid-template-columns: 1fr;
    }
}

/* Radius control */
.radius-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.radius-control input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.radius-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #4285f4;
    border-radius: 50%;
    cursor: pointer;
}

.radius-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #4285f4;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.radius-control span {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.radius-control select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Button row */
.button-row {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.btn:not(:disabled):active {
    transform: translateY(0);
}

.btn-primary {
    background: #4285f4;
    color: white;
}

.btn-primary:not(:disabled):hover {
    background: #3367d6;
}

.btn-secondary {
    background: #28a745;
    color: white;
}

.btn-secondary:not(:disabled):hover {
    background: #218838;
}

/* Status message */
.status-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.status-message.hidden {
    display: none;
}

.status-message.info {
    background: #e7f3ff;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Results section */
.results-section {
    margin-top: 20px;
}

.results-section.hidden {
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.results-header h2 {
    font-size: 20px;
    font-weight: 600;
}

#results-count {
    color: #666;
    font-size: 14px;
}

/* Table container for horizontal scroll on mobile */
.table-container {
    overflow-x: auto;
}

/* Results table */
#results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#results-table th,
#results-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

#results-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

#results-table tr:hover {
    background: #f8f9fa;
}

#results-table td {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Website column styling */
#results-table td a {
    color: #4285f4;
    text-decoration: none;
}

#results-table td a:hover {
    text-decoration: underline;
}

.no-website {
    color: #dc3545;
    font-style: italic;
}

/* Google Autocomplete dropdown styling */
.pac-container {
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
    margin-top: 2px;
}

.pac-item {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}

.pac-item:hover {
    background: #f0f4ff;
}

.pac-item-query {
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    .search-form {
        padding: 20px;
    }

    .button-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    #results-table {
        font-size: 13px;
    }

    #results-table th,
    #results-table td {
        padding: 10px 8px;
    }
}
