/* Main Layout */
.board-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;

}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: top;
    margin-bottom: 10px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}


/* The Grid */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 15px;
}

/* Individual Cards */
.employee-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 8px solid #ccc; /* Default color */
    transition: transform 0.2s, box-shadow 0.2s;

    height: auto;
    min-height: 60px;
    max-height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: auto; 
}

.employee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.employee-card:hover h3 {
    font-size: 1.25rem;
}

/* Only cards the user can edit get the pointer */
.employee-card.is-clickable {
    cursor: pointer;
    position: relative;
}

.employee-card.is-clickable:hover {
    background-color: #f5fdfd;
    
}

/* A tiny hint at the bottom of the card */
.edit-hint {
    font-size: 10px;
    color: #ce7e3d;
    text-align: right;
    margin-top: auto;
    opacity: 0;
    transition: opacity 0.2s;
}

.employee-card.is-clickable:hover .edit-hint {
    opacity: 1;
}

/* #region Dim Status Out Cards */
/* Target the entire card for a subtle fade */
.employee-card.status-out, 
.employee-card.status-on-leave, 
.employee-card.status-rdo, 
.employee-card.status-zzzz{
    background-color: #f8f6f6; /* Slightly greyer background than the white cards */
    opacity: 0.95; /* Dims the entire card slightly */
}

/* Italicize and dim the Name */
.status-out .card-info h3, 
.status-rdo .card-info h3, 
.status-on-leave .card-info h3, 
.status-zzzz .card-info h3 {
    font-style: italic;
    color: #6e6e6e;
    opacity: 1;
}

.contact-info {
    font-size: 0.9rem;
    color: #555;
    margin-left: 10px;
}

/* Dim the contact info (Phone/Email) */
.status-out .contact-info, 
.status-rdo .contact-info, 
.status-on-leave .contact-info, 
.status-zzzz .contact-info {
    color: #6e6e6e !important;
    font-style: italic;
    font-size: 0.85rem;
    margin-left: 10px;
}

/* Dim the 'Last Action' text */
.status-out .card-details p, 
.status-rdo .card-details p, 
.status-on-leave .card-details p, 
.status-zzzz .card-details p {
    color: #6e6e6e;
    font-style: italic;
    opacity: 0.75;
}

/* Ensure the Copy icons also dim so they don't pop too much */
.status-out .copy-btn, 
.status-on-leave .copy-btn, 
.status-rdo .copy-btn, 
.status-zzzz .copy-btn {
    opacity: 0.5;
}
/* #endregion Dim Status Out Cards */

/* Ensure Active text is high-contrast */
.status-in .card-info h3,
.status-telework .card-info h3 {
    color: #212529; /* Darker, crisp text */
    font-weight: 700;
}

/* --- ACTIVE STATUSES --- */
.status-in-office { border-left-color: var(--status-in); }
.status-in-office .status-badge { 
    background: var(--status-in-bg); 
    color: var(--status-in); 
}

.status-telework { border-left-color: var(--status-telework); }
.status-telework .status-badge { 
    background: var(--status-telework-bg); 
    color: var(--status-telework); 
}

/* --- INACTIVE STATUSES (Out, Leave, RDO, Zzzz) --- */
/* Grouping shared traits to save space */
.status-out, .status-on-leave, .status-rdo, .status-zzzz {
    background-color: var(--card-dim-bg); /* Keep background light */
    opacity: 0.9;
}

/* Specific Accents */
.status-out, .status-rdo, .status-zzzz { border-left-color: var(--status-out); }
.status-on-leave { border-left-color: var(--status-leave); }

/* Badge Logic */
.status-out .status-badge, 
.status-rdo .status-badge, 
.status-zzzz .status-badge { 
    background: var(--status-out-bg); 
    color: var(--status-out); 
    font-style: italic;
}

.status-on-leave .status-badge { 
    background: var(--status-leave-bg); 
    color: var(--status-leave); 
    font-style: italic;
}

.card-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1px;
}

.card-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

/* Container for Phone + Time row */
.contact-row-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Keeps the phone and copy icon together on the left */
.phone-block {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Style for the anchored time */
.status-time {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    color: #888;
    margin-right: 10px;
}

/* Ensure time dims with the rest of the card when 'Out' */
.status-out .status-time,
.status-rdo .status-time,
.status-on-leave .status-time,
.status-zzzz .status-time {
    color: #888;
    background: transparent;
    font-style: italic;
}

/* Badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: none;
}

/* Details Section */
.card-details p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.notes {
    font-style: italic;
    font-size: 1rem;
    color: #555;
    border-radius: 4px;
    margin-top: 3px;
    
    /* Only shows styling if there is content inside */
}

.notes:not(:empty) {
    padding: 8px;
    background: #f9f9f9;
    border: 1px dashed #ddd;
}

.punch-btn {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.punch-btn:hover {
    background-color: #0056b3;
}

/* #region Filter Buttons */
.modern-segmented-control {
    display: flex;
    background: #eeeeee;
    padding: 4px;
    border-radius: 10px;
}

.filter-option {
    cursor: pointer;
    flex: 1;
}

.filter-option input[type="radio"] {
    display: none; /* Hide the actual radio circle */
}

.filter-label {
    padding: 6px 12px; /* Reduced padding */
    font-size: 0.85rem; /* Slightly smaller text */
    white-space: nowrap; /* Prevents wrapping */
    border-radius: 5px;
    color: lightslategray;
}
.filter-label:hover {
    background: #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #333;
}

/* Style for when the hidden radio is checked */
.filter-option input[type="radio"]:checked + .filter-label {
    background: rgb(225, 229, 245);
    font-weight: 600;
    color: #007bff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* #endregion */

/* #region Search Bar */
.board-toolbar {
    display: flex;
    justify-content: space-between; /* Pushes items to opposite ends */
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    flex-wrap: wrap; /* Allows wrapping on smaller tablet screens */
    gap: 20px;
}

/* Ensure the radio group doesn't have its own bottom margin anymore */
.filter-group {
    margin-bottom: 0 !important;
}

/* Ensure search container doesn't have its own margin anymore */
.search-container {
    position: relative; /* Essential for absolute children */
    display: inline-flex;
    align-items: center;
    
}

#boardSearch {
    width: 260px;
    padding: 10px 35px 10px 35px; /* Left padding for glass, right for X */
    border-radius: 25px;
    border: 1px solid #ced4da;
    outline: none;
    height: 25px;
}

#boardSearch:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}
#clearSearch {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    display: none; /* Hidden by default */
    padding: 0;
    line-height: 1;
}

#clearSearch:hover {
    color: #333;
}


/* #endregion */


/* #region Small Copy Button */
.copy-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    color: #888; /* Subtle grey icon */
    transition: color 0.2s, transform 0.1s;
}

.copy-btn:hover {
    color: #007bff; /* Turns blue on hover */
    transform: scale(1.1);
}

.copy-btn svg {
    display: block;
}

/* #region Container for Email + Edit Note row */
/* Ensure it aligns perfectly in the row */
.contact-info .copy-wrapper:last-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 24px; /* Fixed height for consistent alignment */
}

.email-block {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-edit-btn {
    /* Reset all default button styles */
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    margin-right: 10px;
    
    /* Layout */
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Aesthetics */
    color: #888; /* Match your copy buttons */
    transition: color 0.2s, transform 0.1s;
    appearance: none;
    -webkit-appearance: none;
}

.icon-edit-btn:hover {
    color: #007bff; /* Turns blue on hover */
    transform: scale(1.2);
    background: transparent !important; /* Forces background to stay gone */
}
/* #endregion */

/* Optional: Hide the copy button on mobile devices 
   if you find they interfere with scrolling/tapping */
@media (max-width: 600px) {
    .copy-btn {
        padding: 5px; /* Larger hit area for thumbs */
    }
}
/* #endregion */

/* #region Responsive */
@keyframes fadein {
    from { bottom: 0; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}

@keyframes fadeout {
    from { bottom: 30px; opacity: 1; }
    to { bottom: 0; opacity: 0; }
}

/* Responsive adjust for small screens */
@media (max-width: 600px) {
    .board-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .board-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #boardSearch {
        width: 100%; /* Full width on mobile */
    }
}
/* #endregion */

