/* Compact layout for iframe embedding with blue background */
body {
    margin: 0;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #2e5dea;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.container {
    max-width: 500px !important;
    margin: 40px auto !important;
    padding: 0 !important;
}

.card {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    background: #fff !important;
    border-radius: 14px !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
}

.card-body {
    padding: 18px 16px 10px 16px !important;
}

h1 {
    font-size: 1.1rem !important;
    margin-bottom: 12px !important;
    text-align: center;
    color: #2e5dea;
    font-weight: 700;
    line-height: 1.2;
    padding: 0 4px;
}

.search-container {
    margin-bottom: 8px;
    width: 100%;
    position: relative;
    background: #f7fafd;
    border-radius: 10px;
    padding: 18px 18px 10px 18px;
    border: 1.5px solid #e0e7ef;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
}

.input-group {
    margin-bottom: 6px !important;
    width: 100%;
}

.form-control {
    border-radius: 8px !important;
    border: 1.5px solid #bfc9d9 !important;
    padding: 8px 12px;
    font-size: 16px;
    background: #fff;
    color: #333;
    height: 42px;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border: 1.5px solid #2e5dea !important;
    box-shadow: 0 0 0 2px #e0e7ef !important;
    background: #fff;
}

.form-control::placeholder {
    color: #666;
}

.btn-primary, .btn-success {
    border-radius: 0 8px 8px 0 !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 500;
    height: 38px;
}

.btn-primary:hover {
    background-color: #059669 !important;
    border: none !important;
    color: white !important;
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25) !important;
    background-color: #10b981 !important;
}

.btn-primary:active {
    background-color: #047857 !important;
    border: none !important;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: none !important;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    font-size: 14px;
    color: #333;
}

.autocomplete-item:hover {
    background-color: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

#searchResults, #searchTermsResults {
    margin-top: 8px;
    margin-bottom: 0;
}

.business-card {
    border-radius: 10px;
    padding: 12px 10px;
    margin-bottom: 8px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.business-card h3 {
    margin-bottom: 8px;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.business-info {
    color: #666;
    margin-bottom: 4px;
    font-size: 13px;
}

.alert {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    padding: 8px 12px !important;
    border-radius: 7px !important;
    font-weight: 500;
    border: none !important;
    font-size: 13px !important;
}

.alert-info {
    background-color: rgba(227, 242, 253, 0.95) !important;
    color: #1976d2 !important;
}

.alert-success {
    background-color: rgba(232, 245, 232, 0.95) !important;
    color: #2e7d32 !important;
}

.alert-warning {
    background-color: rgba(255, 243, 224, 0.95) !important;
    color: #f57c00 !important;
}

.alert-danger {
    background-color: rgba(255, 235, 238, 0.95) !important;
    color: #d32f2f !important;
}

.loading {
    text-align: center;
    padding: 20px;
    display: none;
    color: white;
}

.loading::after {
    content: "Loading...";
    color: white;
}

/* Override Bootstrap's excessive spacing */
.mt-5, .my-5 { margin-top: 10px !important; }
.mb-4, .my-4 { margin-bottom: 10px !important; }
.mt-4, .my-4 { margin-top: 10px !important; }

/* Remove any potential borders */
* {
    box-sizing: border-box;
}

.row, .col-12 {
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .search-container {
        width: 85%;
    }
    h1 {
        font-size: 1.1rem !important;
        margin-bottom: 15px !important;
    }
}

@media (max-width: 480px) {
    .search-container {
        width: 95%;
    }
    h1 {
        font-size: 1rem !important;
        line-height: 1.3;
    }
}

/* Search Terms Section Styles */
#searchTermsSection .card {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

#searchTermsSection h4 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

#searchTermsSection .text-muted {
    color: #666 !important;
    font-size: 14px;
    margin-bottom: 15px;
}

#searchTermsInput {
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 12px !important;
    font-size: 14px !important;
    resize: vertical;
    min-height: 100px;
}

#searchTermsInput:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25) !important;
}

.btn-success {
    background-color: #10b981 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    color: white !important;
}

.btn-success:hover {
    background-color: #059669 !important;
    color: white !important;
}

.btn-success:disabled {
    background-color: #6b7280 !important;
    cursor: not-allowed;
}

/* Search Terms Results Styles */
#searchTermsResults .card {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

#searchTermsResults h4 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

#searchTermsResults .alert {
    margin-bottom: 8px !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
}

#searchTermsResults .alert strong {
    font-weight: 600;
}

/* Responsive adjustments for search terms */
@media (max-width: 768px) {
    #searchTermsResults .col-md-6 {
        width: 100% !important;
    }
}

/* App-like step transitions */
#stepBusiness, #stepKeywords {
    min-height: 120px;
    width: 100%;
    transition: opacity 0.3s;
}

#stepKeywords {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#goToKeywordsBtn {
    display: block;
    width: 100%;
    font-size: 1rem;
    padding: 12px 0;
    margin-top: 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #10b981 !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(16,185,129,0.08);
    border: none;
    transition: background 0.2s;
}
#goToKeywordsBtn:hover {
    background: #059669 !important;
}

#backToBusinessBtn {
    color: #1976d2 !important;
    background: none !important;
    border: none !important;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-decoration: underline;
    cursor: pointer;
    padding-left: 0;
}
#backToBusinessBtn:hover {
    color: #0d47a1 !important;
    text-decoration: underline;
}

/* Hide search terms/results in business step */
#stepBusiness #searchTermsSection,
#stepBusiness #searchTermsResults {
    display: none !important;
}

/* Hide business search in keyword step */
#stepKeywords .search-container,
#stepKeywords #searchResults {
    display: none !important;
}

@media (max-width: 600px) {
    .container {
        max-width: 98vw !important;
        margin: 10px auto !important;
    }
    .card-body {
        padding: 10px 2vw 6px 2vw !important;
    }
    h1 {
        font-size: 0.98rem !important;
    }
} 