/**
 * ABMSense Dashboard - Wiz UI Style - Modified Version
 * Modern, professional dashboard design with custom lead scoring colors
 */

/* Main Dashboard Layout */
.abmsense-dashboard {
    margin: 20px 0;
    color: #2d3748;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #f4f6f8;
}

/* Header */
.abmsense-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.abmsense-header h1 {
    margin: 0;
    padding: 0;
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
}

.abmsense-beta-badge {
    font-size: 12px;
    font-weight: 600;
    background: #e2e8f0;
    color: #4a5568;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 10px;
    text-transform: uppercase;
}

.abmsense-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#abmsense-refresh-data {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #edf2f7;
    border: 1px solid #cbd5e0;
    color: #4a5568;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    height: 40px;
    box-sizing: border-box;
}

#abmsense-refresh-data i {
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

#abmsense-refresh-data:hover,
.settings-button:hover {
    background-color: #e2e8f0;
    border-color: #a0aec0;
    color: #2d3748;
}

#abmsense-refresh-data i, .settings-button i {
    margin-right: 6px;
}

.settings-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #fff;
    border: 1px solid #3182ce;
    color: #3182ce;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    height: 40px;
    box-sizing: border-box;
    vertical-align: middle;
    line-height: 1;
}

.settings-button i {
    font-size: 16px;
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
}

.settings-button:hover {
    background-color: #e2e8f0;
    color: #4a5568;
}

/* Main Content Cards */
.abmsense-card, .abmsense-info-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.abmsense-card-header, .abmsense-info-card-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.abmsense-card-header h2, .abmsense-info-card-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.abmsense-card-actions {
    display: flex;
    gap: 8px;
}

.abmsense-card-actions .button {
    background-color: #edf2f7;
    border: none;
    color: #4a5568;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    text-decoration: none;
}

.abmsense-card-actions .button:hover {
    background-color: #e2e8f0;
    color: #4a5568;
}

.abmsense-card-actions .button i {
    margin-right: 6px;
}

.abmsense-card-body {
    padding: 0;
}

.abmsense-info-card-body {
    padding: 24px;
}

.abmsense-info-card-body p {
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.abmsense-info-card-body ul {
    margin: 0 0 20px 0;
    padding-left: 24px;
}

.abmsense-info-card-body li {
    margin-bottom: 12px;
    line-height: 1.6;
    display: flex;
    align-items: center;
}

/* Table Styles */
.abmsense-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.abmsense-table th {
    background-color: #f8fafc;
    font-weight: 500;
    text-align: left;
    padding: 12px 24px;
    color: #4a5568;
    font-size: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.abmsense-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    color: #2d3748;
    font-size: 14px;
}

.abmsense-table tr:last-child td {
    border-bottom: none;
}

.abmsense-table tr:hover {
    background-color: #f8fafc;
}

/* Updated Lead Score Styles */
.abmsense-lead-score {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
    justify-content: center;
}

/* Hot leads are now red */
.abmsense-lead-score.hot {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Medium leads are orange */
.abmsense-lead-score.medium {
    background-color: #fef3c7;
    color: #92400e;
}

/* Low leads are now green */
.abmsense-lead-score.low {
    background-color: #def7ec;
    color: #03543e;
}

.abmsense-progress {
    height: 8px;
    width: 100%;
    background-color: #edf2f7;
    border-radius: 4px;
    overflow: hidden;
}

.abmsense-progress-bar {
    height: 100%;
    border-radius: 4px;
}

.abmsense-progress-bar.hot {
    background-color: #e53e3e; /* Red */
}

.abmsense-progress-bar.medium {
    background-color: #f59e0b; /* Orange */
}

.abmsense-progress-bar.low {
    background-color: #10b981; /* Green */
}

/* Rank indicators */
.rank-number {
    font-weight: 600;
    font-size: 16px;
}

.rank-number.top-3 {
    color: #1a56db;
    font-size: 18px;
}

/* Loading Overlay */
#abmsense-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.abmsense-loader {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #1a56db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Placeholder styling */
.abmsense-placeholder-row td {
    text-align: center;
    color: #718096;
}

/* Responsive Adjustments */
@media screen and (max-width: 782px) {
    .abmsense-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .abmsense-header-actions {
        margin-top: 16px;
        width: 100%;
        justify-content: space-between;
    }
}

/* Demo data notice */
.abmsense-notice {
    background-color: #f8fafc;
    border-left: 4px solid #3182ce;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
}

.abmsense-notice p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Force left-to-right text direction */
.abmsense-dashboard,
.abmsense-dashboard * {
    direction: ltr !important;
    text-align: left !important;
}

.abmsense-table th,
.abmsense-table td {
    text-align: left !important;
    direction: ltr !important;
}

/* Only align lead scores to center */
.abmsense-lead-score {
    text-align: center !important;
}

/* Total Companies Box */
.abmsense-total-companies-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.abmsense-total-count-label {
    font-size: 16px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 10px;
    text-align: center;
}

.abmsense-total-count {
    font-size: 42px;
    font-weight: 700;
    color: #1a56db;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Time Period Selector */
.abmsense-time-period-container {
    background: transparent;              /* match main background */
    box-shadow: none;                     /* remove the card-like shadow */
    padding: 0;                           /* remove inner spacing */
    margin: 16px 0 24px 0;                /* spacing between header and card */
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.abmsense-time-period-container label {
    font-weight: 500;
    margin-right: 10px;
    color: #2d3748; /* darker gray to match header */
}

.abmsense-time-period-container select {
    padding: 6px 24px 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: white;
    color: #4a5568;
    font-weight: 500;
    min-width: 150px;
}

/* Main Header (on main background) */
.abmsense-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.abmsense-main-title h1 {
    margin: 0;
    padding: 0;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
    display: flex;
    align-items: center;
}

.abmsense-main-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Building icon above Identified Companies */
.abmsense-companies-icon {
    margin-bottom: 10px;
}

.abmsense-companies-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #1a56db;
}

/* Lead Scoring Card - Make it wider */
.lead-scoring-card {
    width: 100%;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .abmsense-main-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .abmsense-main-controls {
        margin-top: 16px;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .abmsense-time-period-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    margin: 16px 0 24px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    }
}