﻿/* ===== MODAL RESPONDER SOLICITUD V4 ===== */
/* Consistente con Modal Ver Solicitud - Simple, Mobile-First */

/* Modal Base */
.resp-v4-modal {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

#modalResponderSolicitud .modal-dialog {
    max-width: 500px;
}

/* ===== HEADER ===== */
.resp-v4-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 20px;
}

.resp-v4-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #111827;
}

/* ===== BODY ===== */
.resp-v4-body {
    padding: 20px;
    background: #e5e7eb;
}

/* ===== HEADLINE: Responder solicitud de [tipo] sobre [animal] ===== */
.resp-headline {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.resp-headline-text {
    margin-bottom: 8px;
}

.resp-headline-prefix,
.resp-headline-sobre {
    color: #6b7280;
    font-size: 1rem;
}

.resp-headline-tipo {
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 1rem;
    text-transform: capitalize;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.resp-animal-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    padding: 8px 16px 8px 8px;
    border-radius: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.resp-animal-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.resp-animal-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
}

/* ===== CARDS ===== */
.resp-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
}

.resp-section-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.resp-section-label i {
    color: #2563eb;
    font-size: 0.95rem;
}

/* Información del Solicitante - Header con Avatar */
.resp-solicitante-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.resp-solicitante-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.resp-solicitante-avatar i {
    font-size: 1.5rem;
    color: white;
}

.resp-solicitante-info {
    flex: 1;
    min-width: 0;
}

.resp-solicitante-nombre {
    font-weight: 700;
    color: #111827;
    font-size: 1rem;
    margin-bottom: 2px;
}

.resp-solicitante-tipo {
    font-size: 0.8125rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 4px;
}

.resp-solicitante-email {
    font-size: 0.8125rem;
    color: #3b82f6;
    display: flex;
    align-items: center;
    gap: 4px;
    word-break: break-word;
}

.resp-solicitante-email i {
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Detalles del Solicitante - Grid con Iconos */
.resp-solicitante-detalles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.resp-sol-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.resp-sol-item:hover {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.resp-sol-item > i {
    font-size: 1.125rem;
    color: #3b82f6;
    flex-shrink: 0;
    margin-top: 2px;
}

.resp-sol-item > div {
    flex: 1;
    min-width: 0;
}

.resp-sol-label {
    color: #6b7280;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    font-weight: 600;
}

.resp-sol-value {
    color: #111827;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
}

/* Mensaje texto */
.resp-mensaje-texto {
    color: #495057;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== FORMULARIO ===== */
.resp-form-group {
    margin-bottom: 16px;
}

.resp-label {
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    display: block;
    font-size: 0.875rem;
}

.resp-optional {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.8125rem;
}

.resp-select,
.resp-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.resp-select:focus,
.resp-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.resp-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.4;
}

.resp-textarea::placeholder {
    color: #9ca3af;
}

/* Info Box */
.resp-info-box {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-left: 4px solid #3b82f6;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #1e40af;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}

.resp-info-box i {
    color: #2563eb;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 1rem;
}

/* Warning Box */
.resp-warning-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #92400e;
    margin-top: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.resp-warning-box i {
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 0.9rem;
}

/* Char Count */
.resp-char-count {
    text-align: right;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* ===== CANALES DE CONTACTO ===== */
.resp-canales {
    margin-top: 12px;
}

.resp-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.resp-checkbox {
    display: flex;
    align-items: flex-start;
    padding: 14px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.resp-checkbox:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.resp-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.resp-checkbox input[type="checkbox"]:checked + .resp-checkbox-content {
    color: #1e40af;
}

.resp-checkbox-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
}

.resp-checkbox-icon {
    font-size: 1.125rem;
    color: #6b7280;
    margin-top: 1px;
}

.resp-checkbox-label {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.resp-checkbox-preview {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
    font-weight: 500;
}

/* ===== CHECKBOX SIMPLE ===== */
.resp-checkbox-simple {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background-color: #f0fdf4;
    border: 1px solid #dcfce7;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #111827;
}

.resp-checkbox-simple input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== FOOTER ===== */
.resp-v4-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.resp-v4-footer .btn {
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
    .resp-solicitante-detalles {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .resp-solicitante-avatar {
        width: 56px;
        height: 56px;
    }
    
    .resp-solicitante-avatar i {
        font-size: 1.75rem;
    }
}

#responder-alerts .alert {
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px;
	margin: 0;
}

#responder-alerts .alert i {
	font-size: 1.1rem;
	flex-shrink: 0;
	margin-top: 2px;
}

/* ===== ALERTA INFORMATIVA ===== */
#modalResponderSolicitud .alert-info {
	background-color: rgba(23, 162, 184, 0.05);
	border: 1px solid rgba(23, 162, 184, 0.2);
	border-left: 4px solid #17a2b8;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 16px;
}

#modalResponderSolicitud .alert-info i {
	color: #17a2b8;
}

/* ===== OVERRIDES V8 CHAT BUBBLE (anulan estilos legacy) ===== */
#modalResponderSolicitud .modal-header {
    background: #ffffff;
    color: #0f172a;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    border-radius: 24px 24px 0 0;
    padding: 16px 20px;
    box-shadow: none;
    align-items: flex-start;
}

#modalResponderSolicitud .modal-header .modal-title {
    font-weight: 700;
    font-size: .95rem;
    color: #059669;
}

#modalResponderSolicitud .modal-header .btn-close {
    filter: none;
}

/* ===== MODAL BODY — V8 Chat Bubble ===== */
#modalResponderSolicitud .modal-body {
    background: #f3f4f6;
    padding: 14px 16px 8px;
}

/* ===== MODAL FOOTER — V8 Chat Bubble ===== */
#modalResponderSolicitud .modal-footer {
    background: #ffffff;
    border-top: none;
    padding: 12px 16px 16px;
    border-radius: 0 0 24px 24px;
    display: flex;
	gap: 8px;
	justify-content: flex-end;
}

#modalResponderSolicitud .modal-footer .btn {
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: .875rem;
    transition: opacity .15s;
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    flex: 1;
    justify-content: center;
}

#modalResponderSolicitud .modal-footer .btn-secondary {
    background: #6c757d;
    color: white;
}

#modalResponderSolicitud .modal-footer .btn-secondary:hover {
    background: #545b62;
    opacity: .9;
}

#modalResponderSolicitud .modal-footer .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

#modalResponderSolicitud .modal-footer .btn-success:hover {
    opacity: .9;
}

#modalResponderSolicitud .modal-footer .btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
	#modalResponderSolicitud .modal-body {
		padding: 16px;
	}

	#modalResponderSolicitud .mb-4 {
		margin-bottom: 12px !important;
	}

	#modalResponderSolicitud .mb-4:first-of-type .row {
		flex-direction: column;
	}

	#modalResponderSolicitud .mb-4:first-of-type img {
		width: 100%;
		max-width: 100px;
		height: auto;
		margin: 0 auto;
		display: block;
	}

	#formResponderSolicitud #info-solicitante .row {
		grid-template-columns: 1fr;
	}

	#modalResponderSolicitud .modal-footer {
		flex-direction: column;
	}

	#modalResponderSolicitud .modal-footer .btn {
		width: 100%;
		justify-content: center;
	}

	#modalResponderSolicitud .modal-header .modal-title {
		font-size: 1rem;
	}

	#modalResponderSolicitud textarea.form-control {
		min-height: 120px;
	}
}

@media (max-width: 480px) {
	#modalResponderSolicitud .modal-header {
		padding: 16px;
	}

	#modalResponderSolicitud .modal-header .modal-title {
		font-size: 0.95rem;
	}

	#modalResponderSolicitud .modal-footer {
		flex-direction: row;
		flex-wrap: wrap;
	}

	#modalResponderSolicitud .modal-body {
		padding: 12px;
	}

	#modalResponderSolicitud .mb-4 {
		margin-bottom: 10px !important;
		padding: 10px;
	}

	#modalResponderSolicitud .mb-4 h6 {
		font-size: 0.8rem;
		margin-bottom: 12px;
	}

	#modalResponderSolicitud .form-label {
		font-size: 0.9rem;
	}

	#modalResponderSolicitud .form-control,
	#modalResponderSolicitud .form-select {
		font-size: 0.9rem;
		padding: 8px 10px;
	}

	#modalResponderSolicitud textarea.form-control {
		min-height: 100px;
	}

	#modalResponderSolicitud .form-check {
		padding: 10px;
		font-size: 0.9rem;
	}

	#modalResponderSolicitud .text-muted {
		font-size: 0.8rem;
	}

	#modalResponderSolicitud .modal-footer {
		padding: 12px;
		gap: 8px;
	}

	#modalResponderSolicitud .modal-footer .btn {
		padding: 8px 16px;
		font-size: 0.85rem;
	}
}

/* ===== ANIMACIONES ===== */
@keyframes slideInDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

@media (prefers-contrast: high) {
	#modalResponderSolicitud .modal-header {
		background: #10b981;
		border: 2px solid #000;
	}

	#modalResponderSolicitud .form-control,
	#modalResponderSolicitud .form-select {
		border-width: 2px;
	}

	#modalResponderSolicitud .form-check {
		border-width: 2px;
	}
}

/* ===== UTILIDADES ===== */
.d-none {
	display: none !important;
}

.d-block {
	display: block !important;
}

/* Focus styles for keyboard navigation */
#modalResponderSolicitud .form-control:focus,
#modalResponderSolicitud .form-select:focus,
#modalResponderSolicitud .form-check-input:focus,
#modalResponderSolicitud .btn:focus {
	outline: 2px solid #10b981;
	outline-offset: 2px;
}

/* =====================================================
   V8 CHAT BUBBLE — Modal Responder Solicitud
   ===================================================== */

/* Modal base */
.resp-cpt-modal {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}

/* Header — blanco, sin bloque de color sólido */
.resp-cpt-header {
    background: #ffffff;
    color: #0f172a;
    border-bottom: 1px solid #f3f4f6;
    padding: 16px 20px;
    align-items: flex-start;
}

.resp-cpt-title {
    font-size: .95rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 3px;
}

.resp-cpt-subtitle {
    font-size: .8rem;
    color: #6b7280;
    margin: 0 0 8px;
}

.resp-cpt-badge {
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Body — fondo gris chat */
.resp-cpt-body {
    padding: 14px 16px 8px;
    background: #f3f4f6;
}

/* Solicitante card — burbuja con cola abajo-izquierda */
.resp-cpt-card {
    background: #ffffff;
    border: none;
    border-radius: 16px 16px 16px 4px;
    padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    font-size: .875rem;
}

/* Section labels */
.resp-cpt-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: 6px;
    display: block;
}

/* Burbuja mensaje — entrante, cola arriba-izquierda */
.resp-cpt-message {
    background: #ffffff;
    border: none;
    border-radius: 4px 16px 16px 16px;
    padding: 12px 14px;
    font-size: .875rem;
    color: #0f172a;
    white-space: pre-wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    margin-bottom: 0;
}

/* Textarea — burbuja saliente, cola arriba-derecha */
.resp-cpt-textarea {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 16px 4px 16px 16px;
    background: #fff;
    font-size: .875rem;
    font-family: inherit;
    resize: vertical;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: box-shadow .15s;
}
.resp-cpt-textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(5,150,105,.2), 0 2px 8px rgba(0,0,0,.04);
}

/* Checkboxes */
.resp-cpt-check-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.resp-cpt-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: .875rem;
    padding: 8px 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.resp-cpt-check-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
}

.resp-cpt-preview {
    color: #94a3b8;
    font-size: .75rem;
    margin-left: auto;
}

/* Warning */
.resp-cpt-warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: .8rem;
    color: #92400e;
    margin-bottom: 10px;
}

/* Footer */
.resp-cpt-footer {
    padding: 12px 16px 16px;
    border-top: none;
    background: #ffffff;
    gap: 8px;
    flex-wrap: nowrap;
}

.resp-cpt-footer .btn {
    flex: 1;
    white-space: nowrap;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.resp-btn-bloquear-link {
    text-decoration: none;
    opacity: .65;
    transition: opacity .15s;
}
.resp-btn-bloquear-link:hover {
    opacity: 1;
    text-decoration: none;
}

/* Check-labels dentro de tarjeta usan fondo ligeramente gris */
.resp-cpt-card .resp-cpt-check-label {
    background: #f8fafc;
    box-shadow: none;
    border: 1px solid #f0f2f4;
}
.resp-cpt-card .resp-cpt-check-group {
    margin-bottom: 0;
}