/* ==========================================================================
   DashRide — Base Design System Motion & Micro-Interactions (base.uber.com/motion)
   Uber Base Choreography:
   - Subtle spring, swift deceleration curves (150ms micro, 250ms surface)
   - Notifications, Drawers, Floating Sheets & Modals
   ========================================================================== */

@keyframes baseFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes baseSlideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes basePulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.dr-animate-fade-up {
    animation: baseFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Base Toast Stack (Top-Right Floating Inset) */
.dr-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

.dr-toast {
    pointer-events: auto;
    background: #000000;
    color: #FFFFFF;
    border-radius: var(--base-radius-card);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: var(--base-elevation-3);
    animation: baseSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dr-toast.dr-toast-leaving {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.dr-toast-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--base-radius-pill);
    background: #262626;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}

.dr-toast.success .dr-toast-icon { background: var(--base-positive); }
.dr-toast.warning .dr-toast-icon { background: var(--base-warning); }
.dr-toast.danger .dr-toast-icon { background: var(--base-brand-red); }

.dr-toast-content {
    flex: 1;
    min-width: 0;
}

.dr-toast-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 2px;
}

.dr-toast-msg {
    font-size: 12.5px;
    color: #B3B3B3;
    line-height: 1.4;
}

.dr-toast-close {
    background: transparent;
    border: none;
    color: #898989;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    transition: color 0.15s ease;
}

.dr-toast-close:hover {
    color: #FFFFFF;
}

/* Base Drawers & Flyouts */
.dr-notif-drawer {
    position: fixed;
    top: var(--dr-header-height);
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 32px);
    max-height: 520px;
    background: var(--base-background-primary);
    border: 1px solid var(--base-border-opaque);
    border-radius: var(--base-radius-card-large);
    box-shadow: var(--base-elevation-3);
    z-index: 950;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: baseSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dr-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--base-border-opaque);
    transition: background 0.15s ease;
    cursor: pointer;
}

.dr-notif-item:hover {
    background: var(--base-background-secondary);
}

.dr-notif-item.unread {
    background: #F8F9FA;
    border-left: 3px solid #000000;
}

/* In-App Live Messaging Drawer */
.dr-chat-drawer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 520px;
    background: var(--base-background-primary);
    border: 1px solid var(--base-border-opaque);
    border-radius: var(--base-radius-card-large);
    box-shadow: var(--base-elevation-3);
    z-index: 960;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: baseSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dr-chat-header {
    background: #000000;
    color: #FFFFFF;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dr-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--base-background-secondary);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dr-chat-bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: var(--base-radius-card);
    font-size: 13.5px;
    line-height: 1.45;
}

.dr-chat-bubble.mine {
    align-self: flex-end;
    background: #000000;
    color: #FFFFFF;
    border-bottom-right-radius: 4px;
}

.dr-chat-bubble.theirs {
    align-self: flex-start;
    background: var(--base-background-primary);
    color: var(--base-content-primary);
    border: 1px solid var(--base-border-opaque);
    border-bottom-left-radius: 4px;
}

.dr-chat-bubble-meta {
    font-size: 10.5px;
    opacity: 0.75;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

/* File Dropzones */
.dr-upload-dropzone {
    border: 1.5px dashed var(--base-border-opaque);
    border-radius: var(--base-radius-card);
    background: var(--base-background-secondary);
    padding: 26px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.dr-upload-dropzone:hover,
.dr-upload-dropzone.dragover {
    border-color: #000000;
    background: var(--base-background-tertiary);
}

.dr-upload-progress-track {
    width: 100%;
    height: 6px;
    background: var(--base-border-opaque);
    border-radius: var(--base-radius-pill);
    overflow: hidden;
    margin-top: 10px;
}

.dr-upload-progress-bar {
    height: 100%;
    width: 0%;
    background: #000000;
    transition: width 0.15s ease;
}
