/* Check-in Container - Mirroring Boss Modal */
.checkin-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    pointer-events: none;
}

.checkin-container.active {
    display: flex;
    pointer-events: auto;
}

/* Disable touch controls when check-in is open */
.checkin-container.active ~ .touch-controls,
.checkin-container.active + * .touch-controls,
body .checkin-container.active ~ .touch-controls {
    pointer-events: none !important;
    z-index: 100 !important;
    opacity: 0.3;
}

.checkin-container.active * {
    pointer-events: auto;
}

/* Check-in Panel - styled like boss-content */
.checkin-panel {
    background: #111111;
    border: 1px solid #333;
    border-radius: 8px;
    width: min(700px, 95vw);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Check-in Header - styled like boss-header */
.checkin-header {
    background: linear-gradient(180deg, #222 0%, #111 100%);
    border-bottom: 1px solid #444;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkin-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

/* Check-in Body - styled like boss-body for vertical side-by-side tabs and content */
.checkin-body {
    display: flex;
    flex-direction: row;
    padding: 15px;
    gap: 15px;
    height: 65vh; /* Fixed height for independent scrolling */
    min-height: 200px;
    max-height: calc(85vh - 60px); /* Fits inside panel */
    overflow: hidden;
}

/* Check-in Tabs - styled like boss-tabs */
.checkin-tabs {
    display: flex;
    flex-direction: column;
    width: 150px;
    min-width: 150px;
    gap: 5px;
    border-right: 1px solid #333;
    padding-right: 15px;
    overflow-y: auto;
}

.checkin-tab {
    flex-shrink: 0;
    background: #222;
    border: 1px solid #444;
    color: #ccc;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: bold;
    font-size: 13px;
}

.checkin-tab:hover {
    background: #333;
    color: #fff;
}

.checkin-tab.active {
    background: #555;
    color: #ff9900;
    border-color: #777;
}

/* Check-in Close Button */
.checkin-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkin-close img {
    width: 20px;
    height: 20px;
}

/* Check-in Content Container */
.checkin-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Check-in Tab Content */
.checkin-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    min-height: 0;
}

.checkin-tab-content::-webkit-scrollbar {
    width: 8px;
}

.checkin-tab-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.checkin-tab-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.checkin-tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.checkin-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Check-in Items Container - Grid Layout like Shop */
.checkin-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    padding: 5px 0;
}

/* Check-in Item - Grid Card Style like Shop */
.checkin-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.checkin-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.checkin-item.claimed {
    opacity: 0.6;
    background: rgba(15, 15, 15, 0.8);
}

.checkin-item.can-claim {
    border-color: rgba(46, 204, 113, 0.5);
    background: rgba(20, 40, 20, 0.8);
}

/* Check-in Item Header */
.checkin-item-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.checkin-item-day,
.checkin-item-hours {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.checkin-item-status {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    text-align: center;
}

.checkin-item-status.claimed {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
}

.checkin-item-status.available {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.checkin-item-status.locked {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* Check-in Progress Bar (for online check-in) */
.checkin-item-progress {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    margin-bottom: 4px;
}

.checkin-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(40, 40, 40, 0.8);
    border-radius: 3px;
    overflow: hidden;
}

.checkin-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s;
}

.checkin-progress-text {
    font-size: 8px;
    color: #95a5a6;
    text-align: center;
    line-height: 1.2;
}

/* Check-in Item Reward - Centered like Shop */
.checkin-item-reward {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 4px;
    margin-bottom: 6px;
}

.checkin-item-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 4px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px;
}

.checkin-item-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.checkin-item-name {
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.checkin-item-quantity {
    color: #95a5a6;
    font-size: 9px;
    text-align: center;
}

/* Check-in Claim Button - Full Width like Shop */
.checkin-claim-btn {
    width: 100%;
    padding: 6px 8px;
    background: rgba(52, 152, 219, 0.3);
    border: 1px solid rgba(52, 152, 219, 0.5);
    border-radius: 4px;
    color: #3498db;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

.checkin-claim-btn:hover:not(:disabled) {
    background: rgba(52, 152, 219, 0.5);
    border-color: rgba(52, 152, 219, 0.7);
    color: #fff;
}

.checkin-claim-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.checkin-claim-btn.claimed {
    background: rgba(149, 165, 166, 0.2);
    border-color: rgba(149, 165, 166, 0.3);
    color: #95a5a6;
    cursor: not-allowed;
}

.checkin-claim-btn.locked {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    cursor: not-allowed;
}

/* Check-in Empty State */
.checkin-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #95a5a6;
    text-align: center;
}

.checkin-empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.checkin-empty div:last-child {
    font-size: 14px;
}

/* Check-in Loading */
.checkin-loading,
.loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #95a5a6;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .checkin-panel {
        width: 88%;
        max-width: 100%;
        max-height: 55vh;
    }

    .checkin-header {
        padding: 3px 5px;
    }

    .checkin-header h3 {
        font-size: 14px;
    }

    .checkin-close {
        font-size: 16px;
        width: 20px;
        height: 20px;
    }

    .checkin-tab {
        font-size: 10px;
        padding: 3px 5px;
    }

    .checkin-tab-content {
        padding: 3px;
    }

    /* Smaller grid on mobile */
    .checkin-items {
        grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
        gap: 3px;
        padding: 2px 0;
    }

    .checkin-item {
        padding: 3px;
        border-radius: 4px;
    }

    .checkin-item-header {
        margin-bottom: 1px;
        gap: 1px;
    }

    .checkin-item-day,
    .checkin-item-hours {
        font-size: 7px;
    }

    .checkin-item-status {
        font-size: 6px;
        padding: 1px 2px;
    }

    .checkin-item-progress {
        margin-bottom: 1px;
        gap: 1px;
    }

    .checkin-progress-bar {
        height: 3px;
    }

    .checkin-progress-text {
        font-size: 5px;
    }

    .checkin-item-image {
        width: 20px;
        height: 20px;
        margin-bottom: 1px;
        padding: 2px;
    }

    .checkin-item-name {
        font-size: 7px;
    }

    .checkin-item-quantity {
        font-size: 6px;
    }

    .checkin-claim-btn {
        padding: 2px 3px;
        font-size: 7px;
        margin-top: 2px;
    }

    .checkin-item-reward {
        gap: 2px;
        margin-bottom: 2px;
    }

    .checkin-item-info {
        gap: 1px;
    }

    .checkin-empty {
        padding: 20px 10px;
    }

    .checkin-empty-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }

    .checkin-empty div:last-child {
        font-size: 12px;
    }

    .loading-message {
        padding: 20px 10px;
        font-size: 12px;
    }
}

