/* cards/ccp_daily_card/style.css */
/* Custom styles for CCP Daily card and modal */

#ccpDailyCard .mini-chart {
    height: 120px;
    margin: 15px 0;
}

#ccpDailyModal .ccp-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

#ccpDailyModal .status-pass {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

#ccpDailyModal .status-fail {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

#ccpDailyModal .ccp-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#ccpDailyModal .ccp-table th,
#ccpDailyModal .ccp-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    font-size: 0.85rem;
}

#ccpDailyModal .ccp-table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: #475569;
}

#ccpDailyModal .ccp-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Date selector container and buttons styling */
#ccpDailyCard .ccp-date-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    justify-content: space-between;
}

#ccpDailyCard .ccp-date-btn {
    flex: 1;
    border: none;
    padding: 6px 4px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: 'Prompt', sans-serif;
    background: transparent;
    color: #64748b;
}

#ccpDailyCard .ccp-date-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    color: #1e293b;
}

#ccpDailyCard .ccp-date-btn.active {
    background: white;
    color: #6366f1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Monthly Table Container & Layout */
#ccpDailyModal .ccp-month-table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    background: white;
}

#ccpDailyModal .ccp-month-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Prompt', sans-serif;
    font-size: 0.72rem;
}

#ccpDailyModal .ccp-month-table th,
#ccpDailyModal .ccp-month-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    text-align: left;
    white-space: nowrap;
}

#ccpDailyModal .ccp-month-table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: #475569;
    text-align: center;
}

/* Sticky top headers styling */
#ccpDailyModal .ccp-month-table thead tr:nth-child(1) th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
}

#ccpDailyModal .ccp-month-table thead tr:nth-child(2) th {
    position: sticky;
    top: 35px; /* height of row 1 */
    z-index: 3;
    background: #f8fafc;
}

/* Vertical separator for each day */
#ccpDailyModal .ccp-month-table th.day-group-header {
    border-right: 1.5px solid #cbd5e1;
}

#ccpDailyModal .ccp-month-table th.day-mgr-sub,
#ccpDailyModal .ccp-month-table td.day-mgr-col {
    border-right: 1.5px solid #cbd5e1;
}

/* Sticky left columns styling */
#ccpDailyModal .ccp-month-table th.sticky-col,
#ccpDailyModal .ccp-month-table td.sticky-col {
    position: sticky;
    background: white;
    z-index: 2;
}

#ccpDailyModal .ccp-month-table th.sticky-col {
    background: #f8fafc !important;
    z-index: 5 !important;
    top: 0;
}

#ccpDailyModal .ccp-month-table .col-no {
    left: 0;
    width: 40px;
    min-width: 40px;
    text-align: center;
}

#ccpDailyModal .ccp-month-table .col-emp {
    left: 40px;
    width: 100px;
    min-width: 100px;
}

#ccpDailyModal .ccp-month-table .col-sop {
    left: 140px;
    width: 220px;
    min-width: 220px;
    border-right: 2px solid #cbd5e1;
}

/* Row Hover & sticky column background preservation */
#ccpDailyModal .ccp-month-table tbody tr:hover td {
    background-color: #f8fafc;
}

#ccpDailyModal .ccp-month-table tbody tr:hover td.sticky-col {
    background-color: #f1f5f9;
}

/* Dot Indicators */
#ccpDailyModal .dot-indicator-cell {
    text-align: center !important;
    vertical-align: middle;
    padding: 6px !important;
}

#ccpDailyModal .dot-green {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}

#ccpDailyModal .dot-yellow {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #f59e0b;
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}

#ccpDailyModal .dot-gold {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #d97706;
    box-shadow: 0 0 4px rgba(217, 119, 6, 0.4);
}

#ccpDailyModal .dot-red {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ef4444;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
}

#ccpDailyModal .dot-none {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #cbd5e1;
}

#ccpDailyModal .dot-blue {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #3b82f6;
    box-shadow: 0 0 4px rgba(59, 130, 246, 0.4);
}

/* CCP Monthly Remarks Container & Cards Styling */
.ccp-month-detail-container {
    position: relative;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    text-align: left;
    box-sizing: border-box;
    width: fit-content;
    max-width: 550px;
}

.ccp-month-detail-align-left {
    left: 15px;
}

.ccp-month-detail-align-right {
    margin-left: auto;
    margin-right: 15px;
}

.ccp-month-detail-row-layout {
    display: flex;
    gap: 16px;
    flex-direction: row;
}

.ccp-month-detail-column {
    flex: 1 1 180px;
    max-width: 260px;
}

.ccp-month-detail-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
}

.ccp-month-detail-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    padding: 6px 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    line-height: 1.3;
    white-space: normal;
}

.ccp-month-detail-card-emp {
    border-left: 3px solid #6366f1;
}

.ccp-month-detail-card-mgr {
    border-left: 3px solid #0d9488;
}

.ccp-month-detail-card-empty {
    border-left: 3px solid #94a3b8;
    border-style: dashed;
}

.ccp-month-detail-card .card-label {
    font-size: 0.55rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-right: 6px;
}

.ccp-month-detail-card .card-by {
    font-weight: 800;
    color: #0d9488;
    font-size: 0.65rem;
}

.ccp-month-detail-card .card-by-emp {
    color: #475569;
}

.ccp-month-detail-card .card-subtitle {
    font-size: 0.58rem;
    color: #64748b;
    margin-bottom: 2px;
    font-weight: 600;
}

.ccp-month-detail-card .card-remark {
    font-size: 0.64rem;
    font-weight: 600;
    word-break: break-word;
}

.ccp-month-detail-card-emp .card-remark {
    color: #ef4444;
}

.ccp-month-detail-card-mgr .card-remark {
    color: #0f766e;
}

/* Responsive adjustments for iPad / tablet screens */
@media (max-width: 1200px) {
    #ccpDailyModal .ccp-month-detail-container {
        max-width: 280px !important;
        padding: 10px !important;
    }
    #ccpDailyModal .ccp-month-detail-row-layout {
        flex-direction: column !important;
        gap: 12px !important;
    }
    #ccpDailyModal .ccp-month-detail-column {
        max-width: 100% !important;
    }
}

/* Image Gallery and Lightbox */
.ccp-evidence-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.ccp-evidence-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    background: #f8fafc;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ccp-evidence-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ccp-evidence-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox Modal */
.ccp-lightbox-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.ccp-lightbox-modal.show {
    display: flex;
    opacity: 1;
}

.ccp-lightbox-content {
    max-width: 90%;
    max-height: 85%;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ccp-lightbox-modal.show .ccp-lightbox-content {
    transform: scale(1);
}

.ccp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f3f4f6;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ccp-lightbox-close:hover {
    color: #ef4444;
}

.ccp-lightbox-caption {
    position: absolute;
    bottom: 20px;
    color: #f3f4f6;
    font-size: 1rem;
    text-align: center;
    width: 100%;
    font-family: 'Prompt', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Custom Toggle Switch */
.switch-wrapper {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    vertical-align: middle;
}

.switch-wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.25s ease;
    border-radius: 22px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.25s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.switch-wrapper input:checked + .switch-slider {
    background-color: #2ecc71; /* Vibrant green similar to the user image */
}

.switch-wrapper input:checked + .switch-slider:before {
    transform: translateX(22px);
}

/* Toggle view buttons */
.ccp-toggle-view-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    transition: all 0.2s ease;
    outline: none;
}

.ccp-toggle-view-btn.active {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ccp-toggle-view-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

/* Deduction badge */
.deduction-badge-red {
    display: inline-block;
    background: #ef4444;
    color: white;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.65rem;
    box-shadow: 0 0 3px rgba(239, 68, 68, 0.4);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
    }
    100% {
        transform: scale(1);
    }
}



