/* ================================
   CANDIDATE WIDGET STYLES
   Matches exact design from reference
   ================================ */

   @import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700;9..40,900&display=swap');

   .candidate-widget-container {
    max-width: -webkit-fill-available;
    width: -webkit-fill-available;
       font-family: 'DM Sans', sans-serif;
   }
   
   /* Title Section with Red Bar */
   .candidate-widget-title {
       position: relative;
       margin-bottom: 30px;
       padding-left: 15px;
   }
   
   .title-red-bar {
       position: absolute;
       left: 0;
       top: 50%;
       transform: translateY(-50%);
       width: 5px;
       height: 30px;
       background: red;
   }
   
   .title-text {
       font-family: 'DM Sans', sans-serif;
       font-weight: 900;
       font-size: 22px;
       color: #000;
       margin: 0;
       line-height: 1.2;
   }
   
   /* Scrollable Wrapper */
   .candidate-scrollable-wrapper {
       background: white;
       border: 0.5px solid #cccccc;
       border-radius: 5px;
       box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
       padding: 20px;
   }
   
   /* No scroll version - fixed height for 3 rows */
   .candidate-widget-container.no-scroll .candidate-scrollable-wrapper {
       max-height: none;
       overflow: hidden;
   }
   
   /* Scroll version - max 3 rows visible */
   .candidate-widget-container.has-scroll .candidate-scrollable-wrapper {
       max-height: 400px;
       overflow-y: auto;
       overflow-x: hidden;
   }
   
   /* Custom Scrollbar */
   .candidate-widget-container.has-scroll .candidate-scrollable-wrapper::-webkit-scrollbar {
       width: 6px;
   }
   
   .candidate-widget-container.has-scroll .candidate-scrollable-wrapper::-webkit-scrollbar-track {
       background: #f1f1f1;
       border-radius: 3px;
   }
   
   .candidate-widget-container.has-scroll .candidate-scrollable-wrapper::-webkit-scrollbar-thumb {
       background: #999;
       border-radius: 3px;
   }
   
   .candidate-widget-container.has-scroll .candidate-scrollable-wrapper::-webkit-scrollbar-thumb:hover {
       background: #666;
   }
   
   /* Grid Container - 2 columns */
   .candidate-grid-container {
       display: grid;
       grid-template-columns: repeat(2, 1fr);
       gap: 20px 30px;
   }
   
   /* Individual Candidate Card */
   .candidate-card {
       display: flex;
       align-items: flex-start;
       gap: 15px;
       padding-bottom: 20px;
       border-bottom: 1px solid #DDDDDD;
   }
   
   /* Remove border from last row */
   .candidate-card:nth-last-child(-n+2) {
       border-bottom: none;
       padding-bottom: 0;
   }
   
   /* Candidate Photo */
   .candidate-photo {
       width: 80px;
       height: 80px;
       border-radius: 5px;
       object-fit: cover;
       flex-shrink: 0;
       background: #d9d9d9;
   }
   
   /* Candidate Info Section */
   .candidate-info {
       flex: 1;
       display: flex;
       flex-direction: column;
       gap: 4px;
       min-width: 0;
   }
   
   /* Candidate Name */
   .candidate-name {
       font-family: 'DM Sans', sans-serif;
       font-weight: 900;
       font-size: 18px;
       color: #000;
       margin: 0;
       line-height: 1.2;
       word-wrap: break-word;
   }
   
   /* Party Name */
   .candidate-party {
       font-family: 'DM Sans', sans-serif;
       font-weight: 500;
       font-size: 14px;
       color: #000;
       margin: 0;
       line-height: 1.3;
       word-wrap: break-word;
   }
   
   /* Location */
   .candidate-location {
       font-family: 'DM Sans', sans-serif;
       font-weight: 500;
       font-size: 14px;
       color: #000;
       margin: 0;
       line-height: 1.3;
       word-wrap: break-word;
   }
   
   /* Status Row */
   .candidate-status-row {
       display: flex;
       align-items: center;
       gap: 5px;
       margin-top: 4px;
   }
   
   /* Status Arrow */
   .status-arrow {
       width: 11px;
       height: 8px;
       flex-shrink: 0;
   }
   
   .status-arrow.arrow-down {
       transform: scaleY(-1);
   }
   
   /* Status Icon (for WON/LOST) */
   .status-icon {
       width: 12px;
       height: 12px;
       flex-shrink: 0;
   }
   
   /* Status Text */
   .candidate-status-text {
       font-family: 'DM Sans', sans-serif;
       font-weight: 900;
       font-size: 12px;
       line-height: 1;
       text-transform: uppercase;
   }
   
   .candidate-status-row.lead .candidate-status-text {
       color: #07AB00;
   }
   
   .candidate-status-row.trail .candidate-status-text {
       color: #FF0000;
   }
   
   .candidate-status-row.won .candidate-status-text {
       color: #0066CC;
   }
   
   .candidate-status-row.lost .candidate-status-text {
       color: #CC0000;
   }
   
   /* Responsive Design */
   @media (max-width: 768px) {
       .candidate-grid-container {
           grid-template-columns: 1fr;
           gap: 20px;
       }
       
       .candidate-card {
           border-bottom: 1px solid #DDDDDD;
           padding-bottom: 20px;
       }
       
       .candidate-card:last-child {
           border-bottom: none;
           padding-bottom: 0;
       }
       
       .candidate-widget-container.no-scroll .candidate-scrollable-wrapper {
           max-height: none;
       }
       
       .candidate-widget-container.has-scroll .candidate-scrollable-wrapper {
           max-height: 600px;
       }
   }
   
   @media (max-width: 480px) {
       .candidate-photo {
           width: 60px;
           height: 60px;
       }
       
       .candidate-name {
           font-size: 16px;
       }
       
       .candidate-party,
       .candidate-location {
           font-size: 12px;
       }
       
       .candidate-status-text {
           font-size: 11px;
       }
   }
   
   /* Animation for Updates */
   @keyframes dataUpdate {
       0% {
           background-color: rgba(255, 255, 0, 0.3);
       }
       100% {
           background-color: transparent;
       }
   }
   
   .candidate-card.updated {
       animation: dataUpdate 0.5s ease-out;
   }
   
   .candidate-name.updated,
   .candidate-status-text.updated {
       animation: dataUpdate 0.5s ease-out;
   }
   
   /* Loading State */
   .candidate-widget-container.loading {
       opacity: 0.6;
       pointer-events: none;
   }
   
   