/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Admin Page Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

.admin-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.admin-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.admin-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #ff6b35;
}

/* Upload Section */
.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    background: #fafafa;
}

.upload-box input[type="file"] {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 20px;
    transition: all 0.3s;
}

.file-label:hover {
    transform: scale(1.05);
}

.file-icon {
    font-size: 3rem;
}

#file-name {
    font-size: 1rem;
    color: #666;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-small {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

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

.btn-secondary {
    background: #1a1a1a;
    color: white;
    margin-right: 10px;
}

.btn-secondary:hover {
    background: #000000;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Messages */
.message {
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
}

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

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

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Progress Bar */
.progress-container {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #ff6b35;
}

/* Template Section */
.template-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    overflow-x: auto;
}

.template-info code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e83e8c;
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

tbody tr:hover {
    background: #f8f9fa;
}

.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px !important;
}

/* Actions Section */
.actions-section {
    text-align: center;
    padding: 20px;
}

/* Store Locator Page Styles */
.locator-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.search-panel {
    width: 340px;
    background: white;
    overflow-y: auto;
    border-right: 1px solid #ddd;
}

.search-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 18px 20px;
    text-align: center;
}

.search-header h1 {
    font-size: 1.35rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.search-header p {
    font-size: 0.8rem;
    opacity: 0.95;
    line-height: 1.3;
}

.search-controls {
    padding: 18px 20px;
    background: #f8f9fa;
}

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

#zipcode-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#zipcode-input:focus {
    outline: none;
    border-color: #ff6b35;
}

/* Radius Selector */
.radius-selector {
    margin-top: 12px;
}

.radius-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #495057;
}

.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.875rem;
}

.radio-label input[type="radio"] {
    cursor: pointer;
}

/* Error and Loading */
.error-message {
    padding: 10px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 5px;
    margin: 12px 20px;
    font-size: 0.875rem;
    display: none;
}

.loading {
    text-align: center;
    padding: 15px;
    color: #ff6b35;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Results */
.results-container {
    padding: 0;
}

.results-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.results-header h2 {
    font-size: 1.1rem;
    color: #495057;
    font-weight: 600;
}

.results-list {
    padding: 0;
}

.result-item {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
}

.result-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.result-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}

.result-details h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: #333;
    font-weight: 600;
}

.result-address {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.4;
}

.result-phone {
    font-size: 0.85rem;
    color: #ff6b35;
    margin-bottom: 4px;
}

.result-distance {
    font-size: 0.8rem;
    color: #ff6b35;
    font-weight: 600;
    margin-top: 4px;
}

.no-results {
    padding: 40px 25px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Map Panel */
.map-panel {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* Info Window Styles */
.info-window {
    padding: 10px;
    max-width: 250px;
}

.info-window h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.info-window p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .locator-container {
        flex-direction: column;
    }

    .search-panel {
        width: 100%;
        height: 50vh;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .map-panel {
        height: 50vh;
    }

    .admin-header h1 {
        font-size: 2rem;
    }

    .search-header h1 {
        font-size: 1.5rem;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .input-group {
        flex-direction: column;
    }

    .search-panel {
        height: 60vh;
    }

    .map-panel {
        height: 40vh;
    }
}
