/**
 * Plugin: Companies House Business Checker
 * File: public-style.css
 * Description: Core styling for the Company Report dashboard and Live Search Widget
 */

 .chc-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #111827;
}

/* --- Section Styling --- */
.chc-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.chc-section h2 {
    font-size: 24px;
    font-weight: 700;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 15px;
    margin: 0 0 20px 0;
}

/* --- Score Section (Top Banner) --- */
.chc-score-section {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); /* Deep Purple Gradient */
    padding: 40px;
    border-radius: 12px;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.chc-score-value {
    font-size: 80px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 10px 0;
}

/* --- SVG Score Gauge --- */
.chc-score-gauge {
    position: relative;
    width: 300px;
    height: 150px;
    margin-top: 20px;
}

.chc-gauge-svg {
    transform: rotateY(180deg); 
}

.chc-gauge-background {
    fill: none;
    stroke: rgba(255,255,255,0.2);
    stroke-width: 20;
    stroke-linecap: round;
}

.chc-gauge-progress {
    fill: none;
    stroke: #4ade80; /* Bright Green for Score */
    stroke-width: 20;
    stroke-dasharray: 251.3; 
    stroke-dashoffset: 251.3; 
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out; 
}

/* --- Data Grid --- */
.chc-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.chc-detail-item {
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.chc-full-width {
    grid-column: 1 / -1; 
}

.chc-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 3px;
}

.chc-value {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

/* --- Status Colors --- */
.chc-status-active {
    color: #10b981; 
    font-weight: 700;
}
.chc-status-dissolved,
.chc-status-liquidation {
    color: #ef4444; 
    font-weight: 700;
}

/* --- Premium Lock Styling --- */
.chc-premium-badge {
    display: inline-block;
    background: #f59e0b; 
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.chc-locked-section {
    text-align: center;
    padding: 50px 20px;
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    margin: 20px 0;
}

.chc-lock-icon {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 15px;
}

.chc-upgrade-button {
    display: inline-block;
    background: #3b82f6; 
    color: white !important;
    padding: 12px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.chc-upgrade-button:hover {
    background: #2563eb;
}

/* ========================================= */
/* --- NEW: Live Search Widget Styling --- */
/* ========================================= */
.chc-search-widget-container {
    position: relative;
    max-width: 600px;
    margin: 20px auto;
}

.chc-search-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    outline: none;
}
.chc-search-input:focus {
    border-color: #3b82f6;
}

.chc-search-results {
    position: absolute;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 100;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.chc-search-result-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* Name, Number, Status */
    gap: 10px;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    line-height: 1.2;
}

.chc-search-result-item:last-child {
    border-bottom: none;
}

.chc-search-result-item:hover {
    background-color: #f0f4ff; /* Light blue on hover */
}

.chc-result-name {
    font-weight: 600;
    color: #111827; 
}

.chc-result-number {
    font-size: 14px;
    color: #6b7280;
    text-align: left;
}

.chc-result-address {
    grid-column: 1 / -1; /* Address spans the full width below name/number/status */
    font-size: 12px;
    color: #9ca3af;
}

.chc-result-status {
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    text-transform: capitalize;
}

/* Status specific colors for search results */
.chc-search-result-item .status-active { color: #10b981; }
.chc-search-result-item .status-dissolved,
.chc-search-result-item .status-liquidation { color: #ef4444; }


.chc-search-loading,
.chc-no-results,
.chc-search-error {
    padding: 12px 15px;
    font-size: 14px;
    color: #666;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.chc-loader {
    /* Basic spinning loader style (Optional: Use an Elementor-native spinner or dashicons) */
    display: inline-block;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    animation: spin 1s linear infinite;
    margin-right: 5px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}