/**
 * Dog Profile Styles
 * Extracted from Snippet 2 (Perfil del perro con galería slider)
 * and Snippet 3 (Información del perro)
 */

/* ===========================
   SNIPPET 2: Gallery & Favorites
   =========================== */

.dog-gallery-wrapper { position: relative; margin-top: 0; }

/* ESTILOS DEL BOTÓN DE FAVORITOS BLINDADOS (ANTI-FONDOS DEL TEMA) */
.btn-favorite-dog, .btn-favorite-dog:hover, .btn-favorite-dog:focus, .btn-favorite-dog:active {
    position: absolute !important; top: 15px !important; right: 15px !important; z-index: 20 !important;
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 10px !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.2s ease !important;
}

.btn-favorite-dog:hover { transform: scale(1.15) !important; }

/* SVG NATIVO PARA EL CORAZÓN */
.btn-favorite-dog svg.heart-icon {
    width: 32px;
    height: 32px;
    transition: all 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* ESTADOS DEL CORAZÓN (SVG) */
.btn-favorite-dog svg.heart-icon.unliked {
    fill: rgba(0,0,0,0.2);
    stroke: #ffffff;
    stroke-width: 2px;
}
.btn-favorite-dog svg.heart-icon.liked {
    fill: #ff3b30;
    stroke: #ff3b30;
    stroke-width: 1px;
    filter: drop-shadow(0 2px 6px rgba(255,59,48,0.4));
}

.btn-favorite-dog.is-saving svg.heart-icon { animation: pulseHeart 0.8s infinite; }
@keyframes pulseHeart { 0% {transform: scale(1);} 50% {transform: scale(1.2);} 100% {transform: scale(1);} }

/* BOTÓN DE EDITAR PERRO (owner only) */
.btn-edit-dog {
    position: absolute !important;
    top: 8px !important;
    right: 85px !important;
    z-index: 20 !important;
    background: #111 !important;
    border: 1px solid #333 !important;
    border-radius: 12px !important;
    padding: 6px 14px 6px 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    height: 34px;
    box-sizing: border-box;
}
.btn-edit-dog i {
    color: #fff;
    font-size: 12px;
    background: #333;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-edit-dog span {
    color: #fff;
    font-size: 14px;
    font-weight: 400;
}
.btn-edit-dog:hover {
    background: #333 !important;
}

.dog-gallery { overflow: hidden; position: relative; }
.dog-gallery-container { display: flex; flex-wrap: nowrap; transition: transform 0.3s ease-in-out; }
.dog-gallery-item { width: 25%; box-sizing: border-box; height: 0; padding-bottom: calc(25% - 10px); position: relative; flex: 0 0 auto; overflow: hidden; display: flex; align-items: center; justify-content: center; background-color: #e0e0e0; cursor: pointer; }
.dog-gallery-item:only-child { width: 25%; padding-bottom: calc(25% - 10px); }
.dog-gallery-item img, .dog-gallery-item video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.dog-gallery-item img[src$="placeholder-dog.svg"] { object-fit: contain !important; padding: 15%; background-color: #f0f0f0; }
.video-play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 40px; color: white; pointer-events: none; }
.dog-gallery-prev, .dog-gallery-next { position: absolute; top: 50%; transform: translateY(-50%); background-color: white !important; border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; color: black !important; font-size: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.2);}
.dog-gallery-prev { left: 10px; } .dog-gallery-next { right: 10px; }

@media (max-width: 1024px) { .dog-gallery-item { width: calc(33.33% - 10px); padding-bottom: calc(33.33% - 10px); } }
@media (max-width: 768px) { .dog-gallery-item { width: 100%; padding-bottom: 100%; } .dog-gallery-item:only-child { width: 100%; padding-bottom: 75%; } }

/* Dog Gallery Lightbox (CRM-style viewer) */
#dog-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.92);
    z-index: 10005;
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#dog-lightbox .lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    padding: 20px;
    transition: all 0.15s;
    opacity: 0.6;
    z-index: 2;
    background: none;
    border: none;
    line-height: 1;
}
#dog-lightbox .lb-nav:hover { opacity: 1; color: #D74709; }
#dog-lightbox .lb-prev { left: 20px; }
#dog-lightbox .lb-next { right: 20px; }

#dog-lightbox .lb-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.15s;
    z-index: 2;
    background: none;
    border: none;
    line-height: 1;
}
#dog-lightbox .lb-close:hover { opacity: 1; color: #ef4444; }

#dog-lightbox .lb-content {
    width: 85%;
    max-width: 900px;
    text-align: center;
    position: relative;
}

#dog-lightbox .lb-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    object-fit: contain;
}

#dog-lightbox .lb-content iframe {
    width: 100%;
    height: 85vh;
    border: none;
    border-radius: 8px;
    background: #fff;
}

#dog-lightbox .lb-title {
    color: #fff;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

#dog-lightbox .lb-counter {
    color: rgba(255,255,255,0.5);
    margin-top: 6px;
    font-size: 12px;
    text-align: center;
}


/* ===========================
   SNIPPET 3: Dog Information
   =========================== */

.dog-profile { background-color: #F5F5F5; padding: 30px; border-radius: 10px; margin: 0; font-family: "Plus Jakarta Sans", sans-serif; }
.dog-profile-header { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; margin-bottom: 20px; }
.dog-profile h1 { color: black; font-size: 36px; font-weight: 600; margin: 0; }

.dp-tag { border-radius: 100px; padding: 6px 14px 6px 6px; display: inline-flex; align-items: center; color: white; font-size: 14px; font-weight: 400; text-decoration: none; height: 34px; box-sizing: border-box; }
.dp-tag img { border-radius: 50%; width: 22px; height: 22px; margin-right: 8px; object-fit: cover; }
.breed-info { background-color: #D74709; }
.kennel-info { background-color: #111; border: 1px solid #333; transition: 0.2s;}
.kennel-info:hover { background-color: #333; }

.dog-profile ul { list-style-type: none; padding: 0; margin: 0; }
.dog-profile ul li { font-size: 16px; margin-bottom: 12px; color: #333; }

.dog-profile .parent-dog { display: flex; align-items: center; border: 1px solid #e5e5e5; border-radius: 10px; padding: 12px; background: #fff; margin-bottom: 15px; cursor: pointer; width: 100%; transition: 0.2s; box-shadow: 0 2px 6px rgba(0,0,0,0.02); }
.dog-profile .parent-dog:hover { border-color: #ccc; box-shadow: 0 4px 10px rgba(0,0,0,0.06); transform: translateY(-2px); }
.dog-profile .parent-dog img { width: 50px; height: 50px; border-radius: 50%; margin-right: 15px; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.dog-profile .parent-dog .dog-details { flex-grow: 1; text-align: left; color: black; line-height: 1.3;}
.dog-profile .parent-dogs { display: flex; justify-content: space-between; gap: 15px; margin-top: 10px; }

.dp-attributes-container { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; }
.dp-attr-box { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 10px 16px; font-size: 15px; color: #333; display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.02); }
.dp-attr-box i { font-size: 16px; }
.dp-attr-box img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.dp-attr-box strong { color: #111; font-weight: 600; margin-right: 4px; }

.dp-sale-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; margin-top: 25px; margin-bottom: 25px; text-align: left; box-shadow: 0 4px 12px rgba(0,0,0,0.04); overflow: hidden; }
.dp-sale-header { background-color: #017DFA; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.dp-sale-title { color: #fff; font-size: 18px; font-weight: bold; display: flex; align-items: center; gap: 8px; margin: 0; }
.dp-btn-crm-header { background: #111; color: #fff; padding: 10px 24px; border-radius: 100px; font-weight: bold; font-size: 15px; border: none; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.dp-btn-crm-header:hover { background: #333; transform: scale(1.02); }
.dp-sale-body { padding: 20px; }
.dp-sale-price { font-size: 26px; font-weight: bold; color: #111; margin: 0 0 8px 0; }
.dp-sale-location { font-size: 14px; color: #777; margin: 0; display: flex; align-items: center; gap: 6px; }
.dp-sale-desc { font-size: 15px; color: #555; margin-top: 15px; line-height: 1.6; }

.dp-tabs { display: flex; gap: 10px; margin-top: 40px; margin-bottom: 10px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
.dp-tabs::-webkit-scrollbar { display: none; }
.dp-tab { padding: 10px 22px; font-size: 15px; font-weight: bold; color: #666; cursor: pointer; border-radius: 100px; background: #fff; border: 1px solid #ddd; display: flex; align-items: center; gap: 8px; transition: 0.2s; white-space: nowrap; }
.dp-tab:hover { border-color: #aaa; color: #111; }
.dp-tab.active { background: #111; color: #fff; border-color: #111; }

.dp-tab-content { display: none; background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 25px; text-align: left; box-shadow: 0 4px 10px rgba(0,0,0,0.02);}
.dp-tab-content.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.expandable-wrapper { position: relative; padding-bottom: 5px; }
.expandable-content { max-height: 140px; overflow: hidden; transition: max-height 0.4s ease; }
.expandable-wrapper.is-expanded .expandable-content { max-height: 5000px; }
.expandable-fade { position: absolute; bottom: 40px; left: 0; width: 100%; height: 60px; background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 60%, rgba(255,255,255,1) 100%); pointer-events: none; transition: opacity 0.3s; }
.expandable-wrapper.is-expanded .expandable-fade { opacity: 0; }
.expandable-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; font-weight: bold; font-family: inherit; font-size: 14px; padding: 15px 0 0 0; cursor: pointer; transition: color 0.2s; margin-top: 10px; color: #000; background: transparent !important; border: none !important; outline: none !important; box-shadow: none !important; text-decoration: none !important;}
.expandable-btn i { transition: transform 0.3s ease; }
.expandable-wrapper.is-expanded .expandable-btn i { transform: rotate(180deg); }

.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.dp-grid-item { text-align: center; text-decoration: none; color: #333; display: block; transition: opacity 0.2s; }
.dp-grid-item:hover { opacity: 0.8; }
.dp-grid-item img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid #f5f5f5; margin-bottom: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.05);}
.dp-grid-item h4 { margin: 0; font-size: 14px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 5px;}

/* MODAL CRM - now uses unified .glp-wizard-* classes */
.btn-submit-crm { background: #017DFA; color: #fff; border: none; padding: 14px 30px; border-radius: 100px; font-size: 16px; font-weight: 600; cursor: pointer; transition: 0.2s; width: 100%; font-family: inherit;}
.btn-submit-crm:hover { background: #0162c4; transform: translateY(-2px); }

/* Botón WhatsApp */
.inquiry-wa-btn { background-color: #25D366; color: #fff; padding: 14px 30px; border-radius: 100px; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; margin-top: 25px; transition: 0.2s; box-shadow: 0 4px 10px rgba(37,211,102,0.3);}
.inquiry-wa-btn:hover { background-color: #128C7E; color: #fff; transform: translateY(-2px);}
.inquiry-wa-btn svg { width: 20px; height: 20px; fill: currentColor; }

@media (max-width: 768px) {
    .dog-profile { padding: 20px 15px; } .dog-profile h1 { font-size: 28px; } .dp-attr-box { flex: 1 1 calc(50% - 8px); justify-content: flex-start; }
    .dog-profile .parent-dogs { flex-direction: column; gap: 10px; } .dp-sale-header { flex-direction: column; align-items: flex-start; gap: 12px; padding: 15px; }
    .dp-btn-crm-header { width: 100%; justify-content: center; }
}
