
/* Presence Alert Box Styles */
.presence-alert-draggable {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 2147483647 !important;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    direction: ltr; /* Default LTR, inner content handles RTL */
}

/* RTL Support */
[dir="rtl"] .presence-alert-draggable {
    direction: rtl;
}

.presence-alert-draggable.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: alertPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes alertPopIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.presence-alert-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: grab;
    user-select: none;
}

.presence-alert-header:active {
    cursor: grabbing;
}

.presence-alert-icon {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.presence-alert-title h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.presence-alert-title small {
    font-size: 11px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.presence-alert-body {
    padding: 25px 20px;
    text-align: center;
    background: #fff;
    position: relative;
}

.presence-alert-avatar {
    width: 80px;
    height: 80px;
    background: #f0f2f5;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #667eea;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.presence-alert-message {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
}

.presence-alert-message strong {
    color: #2d3748;
    font-size: 17px;
    display: block;
    margin-bottom: 5px;
}

/* Analog Clock */
.presence-alert-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.analog-clock {
    width: 108px;
    height: 108px;
    position: relative;
    border-radius: 50%;
    background: white;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-progress-ring circle {
    fill: transparent;
    stroke: #28a745;
    stroke-width: 4;
    transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.clock-marks {
    position: absolute;
    width: 100%;
    height: 100%;
}

.clock-mark {
    position: absolute;
    width: 2px;
    height: 6px;
    background: #e2e8f0;
    left: 50%;
    top: 5px;
    transform-origin: 50% 49px;
    margin-left: -1px;
}

.clock-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform-origin: 50% 100%;
    border-radius: 4px;
    z-index: 2;
}

.hour-hand {
    width: 4px;
    height: 25px;
    background: #2d3748;
    margin-left: -2px;
}

.minute-hand {
    width: 3px;
    height: 35px;
    background: #4a5568;
    margin-left: -1.5px;
}

.second-hand {
    width: 2px;
    height: 40px;
    background: #e53e3e;
    margin-left: -1px;
    z-index: 3;
}

.clock-center {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #2d3748;
    border-radius: 50%;
    z-index: 4;
}

.timer-info {
    text-align: center;
}

.timer-countdown {
    font-size: 24px;
    font-weight: 800;
    color: #2d3748;
    font-variant-numeric: tabular-nums;
}

.timer-label {
    font-size: 12px;
    color: #718096;
}

/* Urgent State */
.analog-clock.urgent .second-hand {
    animation: tickTock 0.5s infinite;
}

.timer-countdown.urgent {
    color: #e53e3e;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.presence-alert-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eef1f6;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-presence-confirm {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-presence-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.btn-presence-confirm:active {
    transform: translateY(0);
}

.btn-presence-confirm:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.presence-alert-info {
    font-size: 12px;
    color: #718096;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .presence-alert-draggable {
        width: 90%;
        max-width: 350px;
    }
    
    .presence-alert-body {
        padding: 20px 15px;
    }
}
