/**
 * Estilos CSS para el Marketplace de Profesionales
 * Este archivo debe guardarse en /wp-content/plugins/marketplace-profesionales/assets/css/style.css
 */

/* Estilos generales */
.pm-form-container,
.pm-valoracion-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f3f3e4;
    border-radius: 15px;
}

body.page-id-162 .pm-form-container {max-width: 500px!important;}

/* Formularios */
.pm-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pm-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;

}

.pm-form-group label {
    font-weight: 800;
    margin-bottom: 5px;
}

#pm-fotos, #pm-foto-principal, #pm-fotos-adicionales {border-radius:0px!important;}

.pm-form-group input[type="text"],
.pm-form-group input[type="email"],
.pm-form-group input[type="password"],
.pm-form-group input[type="tel"],
.pm-form-group select,
.pm-form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 30px !important;
    width: 100%;
    font-size: 16px;
}

.pm-form-group select[multiple] {
    height: 120px;
}

.pm-submit-btn {
    color: white;
    font-size:20px!important;
    cursor: pointer;
    font-weight: 800;
    transition: background-color 0.3s;
}

.pm-submit-btn:hover {
    background-color: #005a87;
}

.pm-form-response {
    margin-top: 15px;
}

.pm-loading {
    padding: 10px;
    background-color: #f8f8f8;
    border-left: 4px solid #0073aa;
}

.pm-success {
    padding: 10px;
    background-color: #e8f7e8;
    border-left: 4px solid #46b450;
}

.pm-error {
    padding: 10px;
    background-color: #fce8e8;
    border-left: 4px solid #dc3232;
}

/* Panel de profesional */
.pm-panel-tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.pm-panel-tabs ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pm-panel-tabs li {
    margin-right: 10px;
}

.pm-panel-tabs li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.pm-panel-tabs li.active a {
    background-color: #fff;
    border-color: #ddd;
    margin-bottom: -1px;
    color: #211F1C;
    font-weight: 800;
}

/* Solicitudes */
.pm-solicitudes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pm-solicitud-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background-color: #f9f9f9;
}

.pm-solicitud-item.pm-urgente {
    border-left: 5px solid #ffb900;
}

.pm-solicitud-item.pm-muy-urgente {
    border-left: 5px solid #dc3232;
}

.pm-solicitud-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.pm-categoria,
.pm-ubicacion,
.pm-urgencia,
.pm-fecha {
    padding: 3px 8px;
    border-radius: 3px;
    background-color: #e9e9e9;
}

.pm-urgencia.pm-urgente {
    background-color: #ffb900;
    color: #000;
}

.pm-urgencia.pm-muy-urgente {
    background-color: #dc3232;
    color: #fff;
}

.pm-respond-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.pm-respond-btn:hover {
    background-color: #005a87;
}

.pm-respuesta-form {
    margin-top: 15px;
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.pm-ya-respondido {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #e8e8e8;
    border-radius: 3px;
    display: inline-block;
    font-style: italic;
}

/* Respuestas */
.pm-respuestas-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pm-respuesta-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background-color: #f9f9f9;
}

.pm-respuesta-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.pm-estado {
    padding: 3px 8px;
    border-radius: 3px;
}

.pm-estado-pendiente {
    background-color: #e9e9e9;
}

.pm-estado-aceptada {
    background-color: #46b450;
    color: #fff;
}

.pm-estado-rechazada {
    background-color: #dc3232;
    color: #fff;
}

.pm-solicitud-original {
    margin-top: 15px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

/* Perfil */
.pm-current-thumbnail,
.pm-gallery-container {
    margin-top: 10px;
}

.pm-current-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.pm-gallery-item {
    position: relative;
    width: 150px;
}

.pm-gallery-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.pm-remove-image {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(220, 50, 50, 0.8);
    color: white;
    border: none;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

/* Valoraciones */
.pm-rating {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
}

.pm-rating input {
    display: none;
}

.pm-rating label {
    cursor: pointer;
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    color: #ccc;
}

.pm-rating input:checked ~ label,
.pm-rating label:hover,
.pm-rating label:hover ~ label {
    color: #ffb900;
}

/* Listado de profesionales */
.pm-profesionales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pm-profesional-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.pm-profesional-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pm-profesional-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.pm-profesional-content {
    padding: 15px;
}

.pm-profesional-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.pm-profesional-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.pm-profesional-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pm-stars {
    color: #ffb900;
}

.pm-profesional-description {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.pm-profesional-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.pm-profesional-link:hover {
    background-color: #005a87;
}

/* Detalle de profesional */
.pm-profesional-detail {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 40px;
}

.pm-profesional-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pm-profesional-main-image {
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
}

.pm-profesional-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.pm-profesional-info {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 15px;
    border: 1px solid #eee;
}

.pm-profesional-info h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.pm-profesional-info-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-profesional-info-item i {
    width: 20px;
    text-align: center;
    color: #0073aa;
}

.pm-profesional-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.pm-profesional-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.pm-profesional-title h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
}

.pm-profesional-rating-lg {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.pm-profesional-rating-lg .pm-stars {
    font-size: 20px;
}

.pm-profesional-description-full {
    line-height: 1.6;
}

.pm-profesional-gallery {
    margin-top: 20px;
}

.pm-profesional-gallery h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.pm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.pm-gallery-item-public {
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
}

.pm-gallery-item-public img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s;
}

.pm-gallery-item-public:hover img {
    transform: scale(1.05);
}

.pm-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.pm-lightbox-content {
    max-width: 90%;
    max-height: 90%;
}

.pm-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    margin: 0 auto;
}

.pm-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.pm-lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.pm-lightbox-prev,
.pm-lightbox-next {
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

/* Valoraciones */
.pm-valoraciones-section {
    margin-top: 40px;
}

.pm-valoraciones-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.pm-valoraciones-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pm-valoracion-item {
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    background-color: #f9f9f9;
}

.pm-valoracion-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pm-valoracion-author {
    font-weight: 600;
}

.pm-valoracion-date {
    color: #777;
    font-size: 14px;
}

.pm-valoracion-rating {
    margin-bottom: 10px;
    color: #ffb900;
}

.pm-valoracion-content {
    line-height: 1.5;
}



/* Filtros */
.pm-filtros-container {
    background-color: #f3f3e4;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 100px;
    border: 1px solid #f3f3e4;
}

.pm-filtros-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.pm-filtro-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pm-filtro-group label {
    font-weight: 600;
    margin-bottom: 5px;
}

.pm-filtro-botones {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.pm-filtro-botones button {
    width: 50%;
    padding: 10px!important;
    cursor: pointer;
}


.pm-filtro-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 30px;
    color: #7a7a7a;
}

.pm-filtro-submitm  {
    align-self: flex-end;
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pm-filtro-clear { }

.pm-filtro-submit:hover {
    background-color: #005a87;
}

/* Pagination */
.pm-pagination {
    margin-top: 30px;
    text-align: center;
}

.pm-pagination .page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
}

.pm-pagination .page-numbers.current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Admin */
.pm-admin-dashboard {
    margin-top: 20px;
}

.pm-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pm-stat-card {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pm-stat-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.pm-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #0073aa;
}

.pm-admin-latest {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.pm-latest-profesionales,
.pm-latest-solicitudes {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pm-latest-profesionales h3,
.pm-latest-solicitudes h3 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .pm-profesional-detail {
        grid-template-columns: 1fr;
    }
    
    .pm-admin-stats {
        grid-template-columns: 1fr;
    }
    
    .pm-filtros-form {
        grid-template-columns: 1fr;
    }
    
    .pm-panel-tabs ul {
        flex-direction: column;
    }
    
    .pm-panel-tabs li {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .pm-panel-tabs li a {
        border-radius: 4px;
    }
}

/* Estilos adicionales para mostrar iconos */
.pm-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.pm-icon-location {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>');
}

.pm-icon-category {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg>');
}

.pm-icon-phone {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path></svg>');
}

.pm-icon-email {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>');
}

.pm-icon-calendar {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
}

.pm-icon-star {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" stroke="none"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>');
    color: #ffb900;
}

/* Animaciones y efectos */
.pm-submit-btn,
.pm-profesional-link,
.pm-respond-btn,
.pm-filtro-submit {
    transition: all 0.2s ease-in-out;
}

.pm-submit-btn:hover,
.pm-profesional-link:hover,
.pm-respond-btn:hover,
.pm-filtro-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pm-solicitud-item,
.pm-respuesta-item,
.pm-valoracion-item,
.pm-profesional-card {
    transition: all 0.3s ease;
}

.pm-solicitud-item:hover,
.pm-respuesta-item:hover,
.pm-valoracion-item:hover,
.pm-profesional-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Efectos de estado */
.pm-loading {
    animation: pm-pulse 1.5s infinite;
}

@keyframes pm-pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

/* Estilos para modal de respuesta */
.pm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.pm-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.pm-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #777;
}

.pm-modal-title {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Estilos adicionales para filtros avanzados */
.pm-filtros-avanzados {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: none;
}

.pm-toggle-filtros {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    padding: 5px 0;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.pm-toggle-filtros::after {
    content: '';
    margin-left: 5px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #0073aa;
    border-bottom: 2px solid #0073aa;
    transform: rotate(45deg);
    transition: transform 0.3s;
}

.pm-toggle-filtros.active::after {
    transform: rotate(-135deg);
}

/* Estilos para mis solicitudes */
.pm-respuestas-solicitud {
    margin: 20px 0;
}

.pm-respuesta-cliente {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
}

.pm-respuesta-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.pm-profesional-nombre {
    font-weight: 600;
    font-size: 16px;
}

.pm-respuesta-fecha {
    color: #777;
    font-size: 14px;
}

.pm-respuesta-contenido {
    margin-bottom: 15px;
}

.pm-profesional-contacto {
    background-color: #f0f0f0;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 15px;
}

.pm-contacto-info {
    margin: 5px 0;
}

.pm-no-respuestas {
    font-style: italic;
    color: #666;
}

.pm-respuestas-count {
    background-color: #0073aa;
    color: white;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 12px;
}

.pm-link-small {
    font-size: 12px;
    color: #0073aa;
    text-decoration: none;
}

.pm-link-small:hover {
    text-decoration: underline;
}