/* PawMeet Specific Styles */
.pawmeet-body {
    background: #0f172a; /* Darker than NutriPaws for a more sleek vibe */
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: white;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.pawmeet-app {
    width: 100%;
    max-width: 480px; /* Mobile first Tinder vibe */
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #1e293b;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

/* Header */
.pm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 10;
}

.pm-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #4ade80, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pm-icon-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.pm-icon-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* Discover Area */
.pm-discover-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pm-state-message {
    text-align: center;
    padding: 2rem;
    color: rgba(255,255,255,0.6);
}

.pm-state-message h3 {
    color: white;
    margin: 1rem 0 0.5rem;
}

/* Cards */
.pm-cards-container {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 70%;
}

.pm-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #334155;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    will-change: transform;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pm-card-img-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.pm-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
    box-sizing: border-box;
}

.pm-card-title {
    margin: 0 0 0.2rem;
    font-size: 2rem;
    font-weight: 700;
}

.pm-card-subtitle {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
}

.pm-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.6rem;
}

.pm-badge {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.pm-badge--health {
    background: rgba(74, 222, 128, 0.25);
    color: #bbf7d0;
}

.pm-badge--neutered {
    background: rgba(59, 130, 246, 0.25);
    color: #bfdbfe;
}

.pm-card-bio {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(255,255,255,0.9);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Controls */
.pm-controls {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 2rem;
    z-index: 20;
}

.pm-action-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pm-action-btn:active {
    transform: scale(0.9);
}

.pm-btn-reject {
    background: white;
    color: #ef4444;
}

.pm-btn-like {
    background: white;
    color: #4ade80;
}

/* Bottom Nav */
.pm-bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.05);
    z-index: 10;
}

.pm-nav-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: color 0.2s;
}

.pm-nav-btn.active {
    color: #4ade80;
}

.pm-nav-btn:hover:not(.active) {
    color: rgba(255,255,255,0.7);
}

/* Chats Area */
.pm-chats-area {
    flex: 1;
    overflow-y: auto;
    background: #1e293b;
    display: flex;
    flex-direction: column;
}

.pm-chats-header {
    padding: 1.5rem 1.5rem 0.5rem;
}

.pm-chats-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.pm-chats-list {
    display: flex;
    flex-direction: column;
}

.pm-chat-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.pm-chat-item:hover {
    background: rgba(255,255,255,0.05);
}

.pm-chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: #334155;
    margin-right: 1rem;
}

.pm-chat-info {
    flex: 1;
    overflow: hidden;
}

.pm-chat-name {
    margin: 0 0 0.3rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
}

.pm-chat-preview {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chat Room */
.pm-chat-room {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.pm-chat-room-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #1e293b;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pm-chat-target-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 1rem;
}

#pm-chat-target-name {
    margin: 0;
    font-size: 1.2rem;
}

.pm-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pm-msg {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.pm-msg-mine {
    align-self: flex-end;
    background: #3b82f6;
    color: white;
    border-bottom-right-radius: 4px;
}

.pm-msg-theirs {
    align-self: flex-start;
    background: #334155;
    color: white;
    border-bottom-left-radius: 4px;
}

.pm-chat-input-area {
    display: flex;
    padding: 1rem;
    background: #1e293b;
    border-top: 1px solid rgba(255,255,255,0.05);
    gap: 0.5rem;
}

#pm-chat-input {
    flex: 1;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 0.8rem 1rem;
    color: white;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
}

#pm-chat-input:focus {
    border-color: #3b82f6;
}

.pm-btn-send {
    background: #3b82f6;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.pm-btn-send:active {
    transform: scale(0.9);
}

/* Fila de estado de ubicación (modal de setup) */
.pm-location-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
}

/* Botón del estado vacío de Discover */
.pm-btn-retry {
    margin-top: 1.2rem;
    padding: 0.9rem 2rem;
    background: var(--brand-green, #8DC63F);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.pm-btn-retry:hover { opacity: 0.9; }
.pm-btn-retry:active { transform: scale(0.96); }

/* Modales generales (setup, onboarding, reporte) */
.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
}

.modal-content,
.glass-panel {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Custom Modal Overlay */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.custom-modal-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.custom-modal-card h3 {
    margin-top: 0;
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.custom-modal-card p {
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Fix contraste: las radio-cards heredaban color:white sobre --input-bg claro */
.pawmeet-body .card-content {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.pawmeet-body .radio-card:hover .card-content {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--brand-green, #8DC63F);
}

.pawmeet-body .radio-card input:checked + .card-content {
    background: rgba(141, 198, 63, 0.18);
    color: var(--brand-green, #8DC63F);
    border-color: var(--brand-green, #8DC63F);
    box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.2);
}

/* =========================================================================
   PAWMEET REFRESH 2026-08 — glass real, header con chip verde, cards premium.
   Solo aditivo — nada de lo de arriba se borra.
   ========================================================================= */

/* Fondo global con dos glows sutiles (verde/azul) */
.pawmeet-body {
    background:
        radial-gradient(60% 40% at 15% 0%, rgba(141, 198, 63, 0.18), transparent 70%),
        radial-gradient(50% 40% at 90% 100%, rgba(59, 130, 246, 0.20), transparent 70%),
        #0b1120;
}

.pawmeet-app {
    background: linear-gradient(180deg, rgba(30,41,59,0.55) 0%, rgba(15,23,42,0.85) 100%);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 0 60px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Header con el back más discoverable + brand más pulido */
.pm-header {
    background: rgba(15, 23, 42, 0.55);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.pm-brand {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #8DC63F 0%, #4ade80 45%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* Chip verde para el botón Volver a NutriPaws (activado por clase en HTML) */
.pm-btn-back--labeled {
    background: rgba(141, 198, 63, 0.14);
    border: 1px solid rgba(141, 198, 63, 0.45);
    color: #8DC63F;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    gap: 0.4rem;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.25s ease,
                box-shadow 0.25s ease;
}
.pm-btn-back--labeled:hover {
    background: rgba(141, 198, 63, 0.24);
    color: #fff;
    box-shadow: 0 8px 20px rgba(141, 198, 63, 0.35);
    transform: translateY(-2px);
}
.pm-btn-back--labeled:active { transform: translateY(0) scale(0.97); }
.pm-btn-back--labeled .pm-back-label {
    display: inline-block;
    line-height: 1;
    letter-spacing: 0.02em;
}

/* pm-icon-btn (perfil) más presente */
.pm-icon-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}
.pm-icon-btn:hover {
    background: rgba(255,255,255,0.14);
    transform: translateY(-1px);
}

/* Tarjeta swipe premium: overlay legible + sombra suave + entrada */
.pm-card {
    background: #1f2a44;
    border-radius: 24px;
    box-shadow:
        0 20px 45px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.06);
    animation: pmCardIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes pmCardIn {
    from { opacity: 0; transform: scale(0.94) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pm-card-info {
    background: linear-gradient(180deg,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.55) 45%,
        rgba(0,0,0,0.92) 100%);
    padding: 3rem 1.5rem 1.5rem;
}

.pm-card-title {
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
    letter-spacing: -0.02em;
}

/* Badges glass */
.pm-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255,255,255,0.95);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.pm-badge--health {
    background: rgba(74, 222, 128, 0.22);
    border-color: rgba(74, 222, 128, 0.38);
    color: #d1fae5;
}
.pm-badge--neutered {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(59, 130, 246, 0.4);
    color: #dbeafe;
}

/* Botones like/reject más ricos */
.pm-action-btn {
    box-shadow: 0 12px 26px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease;
}
.pm-action-btn:hover {
    transform: translateY(-3px) scale(1.05);
}
.pm-btn-like:hover  { box-shadow: 0 16px 32px rgba(74,222,128,0.45); }
.pm-btn-reject:hover { box-shadow: 0 16px 32px rgba(239,68,68,0.4); }

/* Bottom nav pulido */
.pm-bottom-nav {
    background: rgba(15, 23, 42, 0.7);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.3);
    padding: 0.7rem 0.6rem env(safe-area-inset-bottom, 0.7rem);
}
.pm-nav-btn {
    padding: 0.35rem 0.6rem;
    border-radius: 14px;
    transition: color 0.22s ease,
                background 0.22s ease,
                transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pm-nav-btn.active {
    background: rgba(74, 222, 128, 0.14);
    color: #4ade80;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74,222,128,0.25);
}
.pm-nav-btn:active { transform: scale(0.94); }
.pm-nav-btn svg {
    transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pm-nav-btn.active svg { transform: scale(1.12) rotate(-4deg); }
/* Tab "Inicio" (vuelta a NutriPaws) */
.pm-nav-home  { color: rgba(141, 198, 63, 0.85); }
.pm-nav-home:hover { color: #8DC63F; background: rgba(141,198,63,0.10); }

/* Chats list glass */
.pm-chats-area {
    background: transparent;
}
.pm-chat-item {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.22s ease, transform 0.22s ease;
}
.pm-chat-item:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(3px);
}

/* Chat room */
.pm-chat-room {
    background:
        radial-gradient(60% 40% at 15% 0%, rgba(141, 198, 63, 0.10), transparent 70%),
        radial-gradient(50% 40% at 90% 100%, rgba(59, 130, 246, 0.14), transparent 70%),
        #0b1120;
}
.pm-chat-room-header {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pm-msg-mine {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 6px 16px rgba(59,130,246,0.35);
}
.pm-msg-theirs {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
}
#pm-chat-input {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#pm-chat-input:focus {
    border-color: rgba(141, 198, 63, 0.7);
    box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.25);
}
.pm-btn-send {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 8px 20px rgba(59,130,246,0.4);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease;
}
.pm-btn-send:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(59,130,246,0.55); }

/* MODAL GLASS REAL — sustituye el fondo sólido #1e293b anterior */
.pawmeet-body .modal-overlay,
.pawmeet-app .modal-overlay,
.modal-overlay {
    background: rgba(3, 8, 20, 0.6);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.pawmeet-body .modal-content,
.pawmeet-body .glass-panel,
.pawmeet-app .modal-content,
.pawmeet-app .glass-panel {
    background: rgba(30, 41, 59, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        0 28px 60px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.08);
}
@supports not (backdrop-filter: blur(1px)) {
    .pawmeet-body .modal-content,
    .pawmeet-body .glass-panel {
        background: #1e293b !important;
    }
}

/* Custom alert modal en glass también */
.pawmeet-body .custom-modal-overlay { background: rgba(3, 8, 20, 0.7); backdrop-filter: blur(10px); }
.pawmeet-body .custom-modal-card {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 28px 60px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* State messages con más aire */
.pm-state-message .spinner {
    width: 42px; height: 42px;
    border: 3px solid rgba(255,255,255,0.10);
    border-top-color: var(--brand-green, #8DC63F);
    border-radius: 50%;
    animation: pmSpin 0.9s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes pmSpin { to { transform: rotate(360deg); } }

/* Respeto reduce-motion en PawMeet también */
@media (prefers-reduced-motion: reduce) {
    .pm-card, .pm-nav-btn, .pm-action-btn, .pm-btn-send, .pm-chat-item,
    .pm-btn-back--labeled, .pm-icon-btn {
        animation: none !important;
        transition: none !important;
    }
}
