/* ============================================================
   ChatPulse - Water Drop & Glassmorphic Buttons
   Ultra-premium glossy liquid droplet design with specular reflections
   ============================================================ */

/* ---- Base Button ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 12px 26px;
    font-family: var(--font-family);
    font-size: var(--font-sm);
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25), 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(1px) scale(0.97) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.08s ease;
}

/* ---- Ripple Effect on Click ---- */
.btn .btn-ripple {
    position: absolute !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(0);
    animation: ripple 0.5s ease-out forwards;
    pointer-events: none !important;
    z-index: 10;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---- Water Drop Button (Glossy Liquid Droplet) ---- */
.btn-drop,
.btn-primary.btn-drop {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.9) 0%, rgba(9, 132, 227, 0.85) 50%, rgba(0, 206, 201, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-full);
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.55),
        inset 0 -2px 5px rgba(0, 0, 0, 0.25),
        inset 2px 0 4px rgba(255, 255, 255, 0.2),
        0 8px 25px rgba(108, 92, 231, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Top Glass Specular Arc / Glint */
.btn-drop::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 8%;
    right: 8%;
    height: 44%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.08) 80%, transparent 100%);
    border-radius: var(--radius-full) var(--radius-full) 100% 100%;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Liquid Sheen Animation on Hover */
.btn-drop::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 220%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.5s ease;
    pointer-events: none;
}

.btn-drop:hover {
    background: linear-gradient(135deg, rgba(120, 105, 240, 0.95) 0%, rgba(15, 145, 245, 0.9) 50%, rgba(0, 225, 220, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 
        inset 0 3px 6px rgba(255, 255, 255, 0.7),
        inset 0 -2px 6px rgba(0, 0, 0, 0.2),
        0 12px 30px rgba(108, 92, 231, 0.6),
        0 0 20px rgba(0, 206, 201, 0.4);
}

.btn-drop:hover::after {
    opacity: 1;
    transform: scale(1);
}

.btn:active,
.btn-drop:active,
.btn-primary:active,
.btn-secondary:active,
.btn-danger:active,
.btn-success:active,
.btn-outline:active,
.btn-ghost:active {
    transform: translateY(1px) scale(0.97) !important;
    transition: transform 0.08s ease;
}

.btn-icon:active,
.btn-icon-sm:active,
.btn-icon-lg:active {
    transform: translateY(1px) scale(0.94) !important;
    transition: transform 0.08s ease;
}

/* ---- Primary Button ---- */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-primary-hover) 0%, #00cec9 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        0 8px 25px rgba(108, 92, 231, 0.55);
    transform: translateY(-2px);
}

/* ---- Secondary Button ---- */
.btn-secondary {
    background: rgba(0, 206, 201, 0.12);
    border: 1px solid rgba(0, 206, 201, 0.4);
    color: var(--accent-secondary);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2), 0 4px 15px rgba(0, 206, 201, 0.15);
}

.btn-secondary:hover {
    background: rgba(0, 206, 201, 0.22);
    border-color: var(--accent-secondary);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3), var(--shadow-glow-secondary);
}

/* ---- Danger Button ---- */
.btn-danger {
    background: linear-gradient(135deg, rgba(225, 112, 85, 0.85) 0%, rgba(214, 48, 49, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35), 0 6px 18px rgba(225, 112, 85, 0.35);
}

.btn-danger:hover {
    background: linear-gradient(135deg, rgba(235, 120, 95, 0.95) 0%, rgba(225, 55, 55, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.45), 0 8px 22px rgba(225, 112, 85, 0.5);
}

/* ---- Success Button ---- */
.btn-success {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.85) 0%, rgba(0, 206, 201, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35), 0 6px 18px rgba(0, 184, 148, 0.35);
}

.btn-success:hover {
    background: linear-gradient(135deg, rgba(0, 200, 160, 0.95) 0%, rgba(0, 220, 215, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.45), 0 8px 22px rgba(0, 184, 148, 0.5);
}

/* ---- Ghost Button (transparent) ---- */
.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    box-shadow: none;
}

.btn-ghost:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border);
    color: var(--text-primary);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* ---- Outline Button ---- */
.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border-hover);
    color: var(--text-primary);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.btn-outline:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.25);
}

/* ---- Icon Button (circle) ---- */
.btn-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0 !important;
    border-radius: var(--radius-full);
    font-size: var(--font-lg);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.btn-icon-sm {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0 !important;
    border-radius: var(--radius-full);
    font-size: var(--font-base);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.btn-icon-lg {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    padding: 0 !important;
    border-radius: var(--radius-full);
    font-size: var(--font-xl);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.btn-icon i,
.btn-icon svg,
.btn-icon-sm i,
.btn-icon-sm svg,
.btn-icon-lg i,
.btn-icon-lg svg {
    display: inline-block !important;
    vertical-align: middle !important;
    stroke-width: 2.2 !important;
    stroke: currentColor !important;
    fill: none !important;
    margin: 0 auto !important;
}

.btn-icon-sm i,
.btn-icon-sm svg {
    width: 18px !important;
    height: 18px !important;
}

/* ---- Button Sizes ---- */
.btn-sm {
    padding: 8px 18px;
    font-size: var(--font-xs);
}

.btn-lg {
    padding: 14px 34px;
    font-size: var(--font-md);
}

.btn-xl {
    padding: 18px 42px;
    font-size: var(--font-lg);
}

/* ---- Full Width ---- */
.btn-block {
    width: 100%;
    display: flex;
}

/* ---- Button Group ---- */
.btn-group {
    display: inline-flex;
    gap: 2px;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: var(--radius-full) 0 0 var(--radius-full);
}

.btn-group .btn:last-child {
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* ---- Loading State ---- */
.btn-loading {
    pointer-events: none;
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ---- Call Buttons (special) ---- */
.btn-call-audio {
    background: linear-gradient(135deg, #00b894, #00cec9);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff !important;
    border-radius: var(--radius-full);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.45), 0 0 20px rgba(0, 184, 148, 0.45);
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-call-audio:hover {
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.6), 0 0 25px rgba(0, 184, 148, 0.7);
}

.btn-call-video {
    background: linear-gradient(135deg, #0984e3, #6c5ce7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff !important;
    border-radius: var(--radius-full);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.45), 0 0 20px rgba(9, 132, 227, 0.45);
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-call-audio i,
.btn-call-audio svg,
.btn-call-video i,
.btn-call-video svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
    width: 17px !important;
    height: 17px !important;
}

.btn-call-video:hover {
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.6), 0 0 25px rgba(9, 132, 227, 0.7);
}

.btn-call-end {
    background: linear-gradient(135deg, #d63031, #e17055);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: white;
    border-radius: var(--radius-full);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.45), 0 0 20px rgba(225, 112, 85, 0.45);
}

.btn-call-end:hover {
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.6), 0 0 25px rgba(225, 112, 85, 0.7);
}

.btn-call-screen {
    background: linear-gradient(135deg, var(--accent-primary), #00cec9);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: white;
    border-radius: var(--radius-full);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.45), var(--shadow-glow-primary);
}
