/**
 * ═══════════════════════════════════════════════════════════════════════════
 * ملك الطابون - أنماط الورديات ويوم العمل (الكاشير اليدوي)
 * Work Day Button & Modal, Starting Cash Modal, Global Shift Button
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════
   Work Day Button & Modal
   ═══════════════════════════════════════════════════════════════ */

.btn-workday {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-workday:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-workday i {
    font-size: 1rem;
}

.btn-workday.active {
    background: var(--success);
    border-color: var(--success);
    color: var(--text-white);
    animation: workdayPulse 2s ease-in-out infinite;
}

.btn-workday.active i {
    color: var(--text-white);
}

@keyframes workdayPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

/* Work Day Modal Content */
.wd-modal-content {
    max-width: 400px;
    padding: 0;
    overflow: hidden;
}

.wd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.wd-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.wd-modal-header h3 i {
    color: var(--primary);
}

.wd-modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.wd-modal-close:hover {
    background: var(--border-color);
}

.wd-modal-body {
    padding: 24px 20px;
}

/* Status Badge */
.wd-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.wd-status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.wd-status-badge.active i {
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.wd-status-badge.idle {
    background: var(--bg-main);
    color: var(--text-muted);
}

/* Employee Name */
.wd-employee-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.wd-employee-name i {
    color: var(--primary);
}

/* Start Info */
.wd-start-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Timer */
.wd-timer {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--success);
    text-align: center;
    padding: 20px 0;
    letter-spacing: 2px;
    direction: ltr;
    font-family: 'Courier New', monospace;
    background: rgba(16, 185, 129, 0.05);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

/* Notes */
.wd-notes-section {
    margin-bottom: 16px;
}

.wd-notes-section label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.wd-notes-section label i {
    color: var(--primary);
}

.wd-notes-section textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    transition: border-color var(--transition-fast);
}

.wd-notes-section textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.wd-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.wd-btn-start {
    background: var(--success);
    color: var(--text-white);
}

.wd-btn-start:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.wd-btn-end {
    background: var(--danger);
    color: var(--text-white);
}

.wd-btn-end:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Idle State */
.wd-idle {
    text-align: center;
}

.wd-idle-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin: 20px 0;
    opacity: 0.5;
}

/* No Employee */
.wd-no-employee {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
}

.wd-no-employee i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.wd-no-employee p {
    font-size: 1rem;
    font-weight: 600;
}

/* Summary */
.wd-summary {
    text-align: center;
}

.wd-summary-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 12px;
}

.wd-summary h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.wd-summary-details {
    background: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.wd-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.wd-summary-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.wd-summary-row span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.wd-summary-row strong {
    color: var(--primary);
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   Starting Cash Modal
   ═══════════════════════════════════════════════════════════════ */

.starting-cash-content {
    max-width: 380px;
    text-align: center;
    padding: var(--spacing-xl);
}

.starting-cash-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto var(--spacing-md);
    background: rgba(217, 119, 6, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.starting-cash-icon i {
    font-size: 2.2rem;
    color: var(--primary);
}

.starting-cash-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.starting-cash-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-lg);
}

.starting-cash-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    transition: border-color var(--transition-fast);
}

.starting-cash-input-wrapper:focus-within {
    border-color: var(--primary);
}

.starting-cash-input-wrapper input {
    flex: 1;
    border: none;
    background: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    direction: ltr;
}

.starting-cash-input-wrapper input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.starting-cash-currency {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   Global Shift Button
   ═══════════════════════════════════════════════════════════════ */

.btn-global-shift {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-global-shift:hover {
    border-color: var(--info);
    color: var(--info);
}

.btn-global-shift i {
    font-size: 1rem;
}

.btn-global-shift.active {
    background: var(--info);
    border-color: var(--info);
    color: var(--text-white);
    animation: globalShiftPulse 2s ease-in-out infinite;
}

.btn-global-shift.active i {
    color: var(--text-white);
}

@keyframes globalShiftPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .btn-workday span,
    .btn-global-shift span {
        display: none;
    }

    .wd-timer {
        font-size: 2rem;
    }
}
