/* ========================================
   BUSINESS PROFILE MODULE
   Advanced organizer business intelligence
   ======================================== */

/* ── Section Container ── */
.business-profile-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a1a1a 0%, #0f2a2a 50%, #0a1a1a 100%);
    padding: 2rem 0 4rem;
    color: #fff;
}

.business-profile-section .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── Header ── */
.bp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.bp-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bp-header h2 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7FFF00, #6DE800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.bp-header .subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ── Completeness Bar ── */
.bp-completeness {
    background: rgba(15, 42, 42, 0.6);
    border: 1px solid rgba(127, 255, 0, 0.15);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.bp-completeness-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.bp-completeness-bar {
    flex: 1;
    min-width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.bp-completeness-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease, background 0.3s ease;
    background: linear-gradient(90deg, #ff4444, #ffaa00, #7FFF00);
}

.bp-completeness-pct {
    font-size: 1.2rem;
    font-weight: 700;
    color: #7FFF00;
    min-width: 48px;
    text-align: right;
}

.bp-completeness-tips {
    width: 100%;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.25rem;
}

/* ── Tab Navigation ── */
.bp-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(127, 255, 0, 0.3) transparent;
}

.bp-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(15, 42, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.bp-tab:hover {
    background: rgba(127, 255, 0, 0.08);
    border-color: rgba(127, 255, 0, 0.3);
    color: #fff;
}

.bp-tab.active {
    background: rgba(127, 255, 0, 0.15);
    border-color: rgba(127, 255, 0, 0.5);
    color: #7FFF00;
    font-weight: 600;
}

.bp-tab .tab-icon {
    font-size: 1.1rem;
}

.bp-tab .tab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
}

.bp-tab .tab-badge.complete {
    background: #7FFF00;
}

/* ── Tab Panels ── */
.bp-panel {
    display: none;
    animation: bpFadeIn 0.3s ease;
}

.bp-panel.active {
    display: block;
}

@keyframes bpFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Cards / Widgets ── */
.bp-card {
    background: rgba(15, 42, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(127, 255, 0, 0.12);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

.bp-card:hover {
    border-color: rgba(127, 255, 0, 0.25);
}

.bp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.bp-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bp-card-title .emoji {
    font-size: 1.3rem;
}

.bp-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* ── Form Elements ── */
.bp-form-group {
    margin-bottom: 1.25rem;
}

.bp-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.4rem;
}

.bp-label .required {
    color: #ff4444;
}

.bp-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.2rem;
}

.bp-input,
.bp-textarea,
.bp-select {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.bp-input:focus,
.bp-textarea:focus,
.bp-select:focus {
    outline: none;
    border-color: rgba(127, 255, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(127, 255, 0, 0.1);
}

.bp-input::placeholder,
.bp-textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.bp-textarea {
    min-height: 80px;
    resize: vertical;
}

.bp-select option {
    background: #0f2a2a;
    color: #fff;
}

/* ── Row layouts ── */
.bp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.bp-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .bp-row, .bp-row-3 {
        grid-template-columns: 1fr;
    }
}

/* ── Tone Sliders ── */
.bp-slider-group {
    margin-bottom: 1rem;
}

.bp-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.bp-slider-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.bp-slider-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7FFF00;
    min-width: 24px;
    text-align: right;
}

.bp-slider-poles {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.15rem;
}

input[type="range"].bp-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
}

input[type="range"].bp-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #7FFF00;
    border: 2px solid #0a1a1a;
    cursor: pointer;
    transition: transform 0.2s ease;
}

input[type="range"].bp-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"].bp-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #7FFF00;
    border: 2px solid #0a1a1a;
    cursor: pointer;
}

/* ── Tags Input ── */
.bp-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    min-height: 42px;
    cursor: text;
    transition: border-color 0.3s ease;
}

.bp-tags-container:focus-within {
    border-color: rgba(127, 255, 0, 0.5);
}

.bp-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: rgba(127, 255, 0, 0.15);
    border: 1px solid rgba(127, 255, 0, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #7FFF00;
    white-space: nowrap;
}

.bp-tag-remove {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    font-size: 1rem;
    line-height: 1;
}

.bp-tag-remove:hover {
    opacity: 1;
}

.bp-tags-input {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    min-width: 120px;
    flex: 1;
}

.bp-tags-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* ── Dynamic Lists (audiences, goals) ── */
.bp-list-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    transition: border-color 0.3s ease;
}

.bp-list-item:hover {
    border-color: rgba(127, 255, 0, 0.2);
}

.bp-list-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.bp-list-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.bp-list-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* ── Buttons ── */
.bp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.bp-btn-primary {
    background: linear-gradient(135deg, #7FFF00, #5ACC00);
    color: #0a1a1a;
}

.bp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(127, 255, 0, 0.3);
}

.bp-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.bp-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.bp-btn-ai {
    background: linear-gradient(135deg, #7b2ff7, #c471ed);
    color: #fff;
}

.bp-btn-ai:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(123, 47, 247, 0.4);
}

.bp-btn-danger {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.bp-btn-danger:hover {
    background: rgba(255, 68, 68, 0.25);
}

.bp-btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.bp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.bp-btn .spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: bpSpin 0.6s linear infinite;
}

.bp-btn.loading .spinner {
    display: inline-block;
}

.bp-btn.loading .btn-text {
    opacity: 0.6;
}

@keyframes bpSpin {
    to { transform: rotate(360deg); }
}

/* ── AI Result Box ── */
.bp-ai-result {
    background: rgba(123, 47, 247, 0.08);
    border: 1px solid rgba(123, 47, 247, 0.25);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
    display: none;
}

.bp-ai-result.visible {
    display: block;
    animation: bpFadeIn 0.3s ease;
}

.bp-ai-result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #c471ed;
    font-weight: 600;
}

.bp-ai-result-content {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ── Empty States ── */
.bp-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: rgba(255, 255, 255, 0.4);
}

.bp-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.bp-empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.bp-empty-text {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ── Market Intelligence Metrics ── */
.bp-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.bp-metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.bp-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #7FFF00;
    margin-bottom: 0.2rem;
}

.bp-metric-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Goal Progress ── */
.bp-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.bp-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #7FFF00, #6DE800);
    transition: width 0.4s ease;
}

/* ── Status Badges ── */
.bp-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bp-badge-primary {
    background: rgba(127, 255, 0, 0.15);
    color: #7FFF00;
}

.bp-badge-secondary {
    background: rgba(0, 217, 255, 0.15);
    color: #00D9FF;
}

.bp-badge-warning {
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
}

/* ── Toast Notifications ── */
.bp-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10000;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.bp-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.bp-toast.success {
    background: rgba(127, 255, 0, 0.15);
    border: 1px solid rgba(127, 255, 0, 0.3);
    color: #7FFF00;
}

.bp-toast.error {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .bp-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bp-tabs {
        gap: 0.3rem;
    }
    
    .bp-tab {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .bp-card {
        padding: 1rem 1.25rem;
    }
    
    .bp-completeness {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Skeleton loading ── */
.bp-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 100%);
    background-size: 200% 100%;
    animation: bpShimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes bpShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.bp-skeleton-line {
    height: 14px;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.bp-skeleton-line:last-child {
    width: 70%;
}
