/* Auth Shortcuts Plugin Styles - Modern Design */

/* Auth Links Container (Homepage buttons) */
.auth-links-container {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.auth-user-info {
    margin-right: 16px;
    font-weight: 600;
    color: #2c3338;
    font-size: 15px;
}

/* Button Styles */
.auth-button {
    display: inline-block;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

.auth-button-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.auth-button-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a6f 100%);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.4);
}

.auth-button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.auth-button-secondary {
    background: #f5f5f5;
    color: #2c3338;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.auth-button-secondary:hover {
    background: #e8e8e8;
    color: #2c3338;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.auth-button-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.auth-button-logout {
    background: linear-gradient(135deg, #dc3232 0%, #b52727 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 50, 50, 0.3);
}

.auth-button-logout:hover {
    background: linear-gradient(135deg, #b52727 0%, #9a1f1f 100%);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 50, 50, 0.4);
}

.auth-button-logout:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 50, 50, 0.3);
}

/* Form Styles */
.auth-shortcuts-form {
    max-width: 480px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.auth-shortcuts-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0073aa 0%, #005a87 100%);
}

/* Form Header */
.auth-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-form-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.auth-form-subtitle {
    margin: 0;
    font-size: 15px;
    color: #666;
    font-weight: 400;
}

/* Form Fields */
.auth-field {
    margin-bottom: 24px;
}

.auth-field:last-of-type {
    margin-bottom: 0;
}

.auth-field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3338;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background: #fafafa;
    color: #2c3338;
    font-family: inherit;
}

/* Ensure text inputs don't have dropdown styling */
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
    cursor: text;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    padding-right: 16px;
}

.auth-field select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3338' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.auth-field input[type="text"]:hover,
.auth-field input[type="email"]:hover,
.auth-field input[type="password"]:hover,
.auth-field select:hover {
    border-color: #c0c0c0;
    background: #ffffff;
}

.auth-field input[type="text"]:focus,
.auth-field input[type="email"]:focus,
.auth-field input[type="password"]:focus,
.auth-field select:focus {
    outline: none;
    border-color: #0073aa;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.1);
    transform: translateY(-1px);
}

.auth-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

.auth-field-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.auth-field-checkbox label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.auth-field-checkbox input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #0073aa;
}

.auth-field button[type="submit"] {
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    font-size: 16px;
}

/* Links Section */
.auth-links {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 8px;
}

.auth-links a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-links a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    position: relative;
    background: #ffffff;
    padding: 0 16px;
    color: #888;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Switch Link */
.auth-switch-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
}

.auth-switch-link p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.auth-switch-link a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-switch-link a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Error Messages */
.auth-error {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-left: 4px solid #dc3232;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #c53030;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(220, 50, 50, 0.1);
    animation: slideIn 0.3s ease;
}

/* Success Messages */
.auth-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left: 4px solid #22c55e;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #15803d;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
    animation: slideIn 0.3s ease;
    line-height: 1.6;
}

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

/* Success/Info Messages */
.auth-shortcuts-message {
    max-width: 480px;
    margin: 40px auto;
    padding: 32px;
    background: linear-gradient(135deg, #f0f6fc 0%, #e8f2f8 100%);
    border: 1px solid #c3c4c7;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.auth-shortcuts-message p {
    margin: 0 0 20px 0;
    color: #2c3338;
    font-size: 15px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 600px) {
    .auth-links-container {
        flex-direction: column;
        width: 100%;
    }
    
    .auth-button {
        width: 100%;
        min-width: auto;
    }
    
    .auth-shortcuts-form {
        margin: 20px;
        padding: 28px 24px;
        border-radius: 10px;
    }
    
    .auth-form-header h2 {
        font-size: 24px;
    }
    
    .auth-form-subtitle {
        font-size: 14px;
    }
    
    .auth-user-info {
        margin-right: 0;
        margin-bottom: 12px;
        display: block;
        width: 100%;
        text-align: center;
    }
}

/* Frontend Messages Page Styles */
.fm-frontend-messages {
    width: 100%;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

.fm-messages-container-frontend {
    display: flex;
    height: 700px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
}

/* No Messages State */
.fm-no-messages-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: #f0f2f5;
    text-align: center;
}

.fm-no-messages-icon {
    font-size: 80px;
    margin-bottom: 24px;
    opacity: 0.3;
    color: #667eea;
}

.fm-no-messages-state h3 {
    margin: 0 0 12px 0;
    color: #4b5563;
    font-size: 24px;
    font-weight: 600;
}

.fm-no-messages-state p {
    margin: 0;
    font-size: 16px;
    color: #6b7280;
    max-width: 500px;
    line-height: 1.6;
}

/* Sidebar Frontend */
.fm-messages-sidebar-frontend {
    width: 35%;
    min-width: 300px;
    max-width: 380px;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
    flex-shrink: 0;
}

.fm-sidebar-header-frontend {
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.fm-sidebar-header-frontend h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.5px;
}

.fm-sidebar-search-frontend {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    position: relative;
}

.fm-sidebar-search-frontend::before {
    content: "\f179";
    font-family: dashicons;
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #8696a0;
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.fm-sidebar-search-frontend input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    background: #ffffff;
    color: #111b21;
    transition: all 0.2s ease;
}

.fm-sidebar-search-frontend input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.fm-sidebar-search-frontend input::placeholder {
    color: #9ca3af;
}

.fm-sidebar-search-frontend input:focus {
    outline: none;
}

.fm-sidebar-conversations-frontend {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.fm-conversation-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f2f5;
    transition: all 0.2s ease;
}

.fm-conversation-item:hover {
    background: #f8f9fa;
}

.fm-conversation-item.active {
    background: linear-gradient(90deg, #e0e7ff 0%, #f0f4ff 100%);
    border-left: 4px solid #667eea;
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.1);
}

.fm-conversation-avatar {
    position: relative;
    flex-shrink: 0;
}

.fm-conversation-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.fm-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #667eea;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.fm-conversation-info {
    flex: 1;
    min-width: 0;
}

.fm-conversation-name {
    font-size: 15px;
    font-weight: 500;
    color: #111b21;
    margin-bottom: 4px;
}

.fm-conversation-preview {
    font-size: 13px;
    color: #667781;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Chat Area Frontend */
.fm-messages-main-frontend {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    overflow: hidden;
    min-width: 0;
}

.fm-chat-header-frontend {
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fm-chat-user-info-frontend {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fm-user-avatar-frontend {
    position: relative;
}

.fm-user-avatar-frontend img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.fm-user-name-frontend {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.fm-user-status-frontend {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.fm-messages-area-frontend {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
    min-height: 0;
    background: #f0f2f5;
}

/* Message bubbles styling */
.fm-messages-area-frontend .fm-message {
    display: flex;
    margin-bottom: 4px;
}

.fm-messages-area-frontend .fm-message-sent {
    justify-content: flex-end;
}

.fm-messages-area-frontend .fm-message-received {
    justify-content: flex-start;
}

.fm-messages-area-frontend .fm-message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.fm-messages-area-frontend .fm-message-sent .fm-message-bubble {
    background: #e5e7eb;
    color: #111b21;
    border-bottom-right-radius: 4px;
    border: 1px solid #d1d5db;
}

.fm-messages-area-frontend .fm-message-received .fm-message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.fm-messages-area-frontend .fm-message-text {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.fm-messages-area-frontend .fm-message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
}

.fm-messages-area-frontend .fm-message-received .fm-message-footer {
    justify-content: flex-start;
}

.fm-messages-area-frontend .fm-message-time {
    font-size: 11px;
    opacity: 0.7;
}

.fm-messages-area-frontend .fm-message-received .fm-message-time {
    color: rgba(255, 255, 255, 0.8);
}

.fm-messages-area-frontend .fm-message-sent .fm-message-time {
    color: #6b7280;
}

.fm-messages-area-frontend .fm-read-receipt {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    position: relative;
    height: 16px;
    line-height: 16px;
}

.fm-messages-area-frontend .fm-read-receipt svg {
    width: 16px;
    height: 16px;
    display: inline-block;
    flex-shrink: 0;
}

.fm-messages-area-frontend .fm-read-receipt.fm-read svg {
    fill: #25d366;
}

.fm-messages-area-frontend .fm-read-receipt.fm-unread svg {
    fill: #8696a0;
}

.fm-message-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    font-size: 15px;
}

.fm-message-input-area-frontend {
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.fm-input-wrapper-frontend {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #f0f2f5;
    border-radius: 28px;
    padding: 6px 6px 6px 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.fm-input-wrapper-frontend:focus-within {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.fm-input-wrapper-frontend input {
    flex: 1;
    padding: 10px 8px;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    outline: none;
    background: transparent;
    color: #111b21;
    font-weight: 400;
}

.fm-input-wrapper-frontend input::placeholder {
    color: #9ca3af;
}

.fm-send-button-frontend {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.fm-send-button-frontend:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.fm-send-button-frontend:active {
    transform: scale(0.98);
}

.fm-send-button-frontend .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #ffffff;
}

.fm-auth-message {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 20px 0;
}

.fm-auth-message p {
    margin: 0;
    color: #6b7280;
    font-size: 16px;
}

/* Responsive for Messages */
@media (max-width: 768px) {
    .fm-messages-container-frontend {
        flex-direction: column;
        height: auto;
        min-height: 500px;
    }
    
    .fm-messages-sidebar-frontend {
        width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #d1d9e0;
        max-height: 300px;
    }
    
    .fm-messages-main-frontend {
        min-height: 400px;
    }
}

/* Print Styles */
@media print {
    .auth-shortcuts-form {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .auth-button {
        box-shadow: none;
    }
}

/* --- FM: Pin trash icon to bottom-right of message bubble (PWA/frontend) --- */
.fm-message-bubble,
.fm-messages-area-frontend .fm-message-bubble {
    position: relative;
    padding-right: 40px;   /* space for trash icon */
    padding-bottom: 22px;  /* space so icon doesn't overlap time/attachment */
}

.fm-message-bubble .fm-delete-message,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-message {
    position: absolute;
    right: 6px;
    bottom: 6px;
    margin: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    line-height: 1;
}

.fm-message-bubble .fm-delete-message:hover,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-message:hover {
    opacity: 1;
}

/* Keep footer layout from affecting the pinned icon */
.fm-message-footer,
.fm-messages-area-frontend .fm-message-footer {
    position: relative;
}

/* --- FM: FORCE pin delete/trash icon bottom-right --- */
.fm-messages-area-frontend .fm-message-bubble,
.fm-message-bubble {
  position: relative !important;
  padding-right: 44px !important;
  padding-bottom: 28px !important;
}

/* target common delete button classnames */
.fm-messages-area-frontend .fm-message-bubble .fm-delete-message,
.fm-messages-area-frontend .fm-message-bubble .fm-message-delete,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-btn,
.fm-messages-area-frontend .fm-message-bubble .delete-message,
.fm-message-bubble .fm-delete-message,
.fm-message-bubble .fm-message-delete,
.fm-message-bubble .fm-delete-btn,
.fm-message-bubble .delete-message {
  position: absolute !important;
  right: 8px !important;
  bottom: 8px !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  opacity: 0.7;
  line-height: 1 !important;
  z-index: 5 !important;
}

.fm-messages-area-frontend .fm-message-bubble .fm-delete-message:hover,
.fm-messages-area-frontend .fm-message-bubble .fm-message-delete:hover,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-btn:hover,
.fm-messages-area-frontend .fm-message-bubble .delete-message:hover {
  opacity: 1;
}

/* ============================
   PWA / Frontend: tidy trash icon
   ============================ */

/* Ensure the bubble always has room for the pinned icon */
.fm-messages-area-frontend .fm-message-bubble {
  position: relative;
  padding-right: 48px;   /* room for icon */
  padding-bottom: 28px;  /* room so it doesn't clash with time/read */
}

/* Pin + style the delete button (supports a few likely classnames) */
.fm-messages-area-frontend .fm-message-bubble .fm-delete-message,
.fm-messages-area-frontend .fm-message-bubble .fm-message-delete,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-btn,
.fm-messages-area-frontend .fm-message-bubble .delete-message {
  position: absolute;
  right: 8px;
  bottom: 8px;

  width: 28px;           /* consistent tap target */
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;

  background: rgba(0, 0, 0, 0.08);  /* subtle “chip” */
  cursor: pointer;

  opacity: 0.65;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
  z-index: 10;
}

/* Hover/active feedback (desktop + mobile feel) */
.fm-messages-area-frontend .fm-message-bubble .fm-delete-message:hover,
.fm-messages-area-frontend .fm-message-bubble .fm-message-delete:hover,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-btn:hover,
.fm-messages-area-frontend .fm-message-bubble .delete-message:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.12);
}

.fm-messages-area-frontend .fm-message-bubble .fm-delete-message:active,
.fm-messages-area-frontend .fm-message-bubble .fm-message-delete:active,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-btn:active,
.fm-messages-area-frontend .fm-message-bubble .delete-message:active {
  transform: scale(0.95);
}

/* Make the actual icon inside look clean and consistent */
.fm-messages-area-frontend .fm-message-bubble .fm-delete-message .dashicons,
.fm-messages-area-frontend .fm-message-bubble .fm-message-delete .dashicons,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-btn .dashicons,
.fm-messages-area-frontend .fm-message-bubble .delete-message .dashicons,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-message i,
.fm-messages-area-frontend .fm-message-bubble .fm-message-delete i,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-btn i,
.fm-messages-area-frontend .fm-message-bubble .delete-message i,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-message svg,
.fm-messages-area-frontend .fm-message-bubble .fm-message-delete svg,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-btn svg,
.fm-messages-area-frontend .fm-message-bubble .delete-message svg {
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 1;
  display: block;
  opacity: 0.95;
}

/* Optional: on received (dark gradient) bubbles, brighten the chip */
.fm-messages-area-frontend .fm-message-received .fm-message-bubble .fm-delete-message,
.fm-messages-area-frontend .fm-message-received .fm-message-bubble .fm-message-delete,
.fm-messages-area-frontend .fm-message-received .fm-message-bubble .fm-delete-btn,
.fm-messages-area-frontend .fm-message-received .fm-message-bubble .delete-message {
  background: rgba(255, 255, 255, 0.18);
}

/* --- FM: Force trash icon to bottom-right of bubble (desktop + PWA) --- */
.fm-message-bubble,
.fm-messages-area-frontend .fm-message-bubble {
  position: relative !important;
  padding-right: 46px !important;   /* room for icon */
  padding-bottom: 30px !important;  /* keep it off the footer text */
}

/* If the footer is flex, stop it influencing the pinned button */
.fm-message-bubble .fm-message-footer,
.fm-messages-area-frontend .fm-message-bubble .fm-message-footer {
  position: static !important;
}

/* Pin the delete button */
.fm-message-bubble .fm-delete-message,
.fm-message-bubble .fm-message-delete,
.fm-message-bubble .fm-delete-btn,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-message,
.fm-messages-area-frontend .fm-message-bubble .fm-message-delete,
.fm-messages-area-frontend .fm-message-bubble .fm-delete-btn {
  position: absolute !important;
  right: 10px !important;
  bottom: 8px !important;
  top: auto !important;
  left: auto !important;

  margin: 0 !important;
  transform: none !important;
  z-index: 20 !important;
}