/**
 * PLECA Asociados - Front-end Styles
 *
 * @package PLECA_Asociados
 */

/* =========================================================================
   Login
   ========================================================================= */

.pleca-login-wrap {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pleca-login-wrap h2 {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    color: #1d2327;
}

.pleca-login-wrap label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.pleca-login-wrap .input {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.pleca-login-wrap .input:focus {
    border-color: #561D17;
    box-shadow: 0 0 0 1px #561D17;
    outline: none;
}

.pleca-login-wrap p {
    margin: 0 0 16px;
}

.pleca-login-wrap .submit {
    margin: 20px 0 0;
    text-align: center;
}

.pleca-login-wrap #wp-submit {
    width: 100%;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    background: #561D17;
    border-color: #561D17;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    transition: background 0.15s;
}

.pleca-login-wrap #wp-submit:hover {
    background: #3d1410;
    border-color: #3d1410;
}

.pleca-login-wrap input[type="checkbox"] {
    margin-right: 6px;
}

.pleca-login-footer {
    text-align: center;
    margin: 16px 0 0;
    font-size: 13px;
}

.pleca-login-footer a {
    color: #561D17;
    text-decoration: none;
}

.pleca-login-footer a:hover {
    text-decoration: underline;
}

.pleca-login-wrap .pleca-notice {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
}

/* =========================================================================
   Password requirements
   ========================================================================= */

.pleca-pass-req {
    list-style: none;
    margin: 1px 0 16px;
    padding: 0;
}

.pleca-pass-req .pleca-req {
    font-size: 12px;
    color: #999;
    padding: 0;
    transition: color 0.15s;
}

.pleca-pass-req .pleca-req::before {
    content: "\2717";
    margin-right: 6px;
    font-weight: 700;
}

.pleca-pass-req .pleca-req-ok {
    color: #22863a;
}

.pleca-pass-req .pleca-req-ok::before {
    content: "\2713";
}

.pleca-login-wrap #pleca-reset-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pleca-login-wrap #pleca-reset-submit:not(:disabled) {
    background: #561D17;
    border-color: #561D17;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

.pleca-login-wrap #pleca-reset-submit:not(:disabled):hover {
    background: #3d1410;
}

/* =========================================================================
   Profile (front-end)
   ========================================================================= */

.pleca-profile-wrap {
    max-width: 100%;
    margin: 40px auto;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.pleca-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #e2e4e7;
    background: #fafafa;
}

.pleca-profile-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.pleca-profile-logout {
    margin: 0;
    font-size: 13px;
}

.pleca-profile-logout a {
    color: #b32d2e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.pleca-profile-logout a:hover {
    color: #8a2020;
}

/* -- Form -- */

.pleca-profile-form {
    padding: 28px 32px;
}

.pleca-profile-form .form-table {
    border-collapse: collapse;
}

.pleca-profile-form .form-table th {
    width: 180px;
    padding: 14px 16px 14px 0;
    font-size: 13px;
    font-weight: 600;
    color: #3c434a;
    vertical-align: top;
    border: none;
}

.pleca-profile-form .form-table td {
    padding: 12px 0;
    border: none;
    vertical-align: top;
}

.pleca-profile-form .form-table tr:last-child th,
.pleca-profile-form .form-table tr:last-child td {
    border-bottom: none;
}

.pleca-profile-form .form-table h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin: 20px 0 8px;
    padding: 8px 0;
    border-bottom: 2px solid #561D17;
    display: inline-block;
}

.little-text { 
    font-size:10px;
    color:lightslategray;
    float:left;    
}
/* -- Inputs -- */

.pleca-profile-form input[type="text"],
.pleca-profile-form input[type="email"],
.pleca-profile-form input[type="url"],
.pleca-profile-form input[type="password"],
.pleca-profile-form select {
    width: 100%;
    max-width: 400px;
    padding: 9px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #1d2327;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 5px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.pleca-profile-form input[type="text"]:focus,
.pleca-profile-form input[type="email"]:focus,
.pleca-profile-form input[type="url"]:focus,
.pleca-profile-form input[type="password"]:focus,
.pleca-profile-form select:focus {
    border-color: #561D17;
    box-shadow: 0 0 0 1px #561D17, inset 0 1px 2px rgba(0, 0, 0, 0.04);
    outline: none;
}

.pleca-profile-form input:disabled {
    background: #f6f7f7;
    color: #8c8f94;
    cursor: not-allowed;
    border-color: #e2e4e7;
}

/* -- Textarea -- */

.pleca-profile-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #1d2327;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 5px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
}

.pleca-profile-form textarea:focus {
    border-color: #561D17;
    box-shadow: 0 0 0 1px #561D17, inset 0 1px 2px rgba(0, 0, 0, 0.04);
    outline: none;
}

/* -- Select multiple -- */

.pleca-profile-form select[multiple] {
    width: 100%;
    max-width: 100%;
    min-height: 110px;
    padding: 6px 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #1d2327;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 5px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.pleca-profile-form select[multiple]:focus {
    border-color: #561D17;
    box-shadow: 0 0 0 1px #561D17;
    outline: none;
}

.pleca-profile-form select[multiple] option {
    padding: 5px 8px;
    border-radius: 3px;
}

.pleca-profile-form select[multiple] option:checked {
    background: #561D17;
    color: #fff;
}

/* -- Description -- */

.pleca-profile-form .description {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    line-height: 1.4;
}

/* -- Submit -- */

.pleca-profile-form .submit {
    padding: 20px 0 8px;
    margin: 0;
    border-top: 1px solid #f0f0f1;
    display: flex;
    align-items: center;
    gap: 16px;
}

#pleca-profile-notice-inline .pleca-notice {
    margin: 0;
    display: inline-block;
    vertical-align: middle;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.4;
}

.pleca-profile-form #pleca-profile-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #561D17;
    border-color: #561D17;
    color: #fff;
    padding: 9px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(86, 29, 23, 0.2);
}

.pleca-profile-form #pleca-profile-save:hover {
    background: #3d1410;
    border-color: #3d1410;
    box-shadow: 0 2px 6px rgba(86, 29, 23, 0.25);
}

.pleca-profile-form #pleca-profile-save:active {
    transform: translateY(1px);
}

/* -- Notices -- */

.pleca-profile-wrap .pleca-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.5;
}

.pleca-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pleca-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* =========================================================================
   Search
   ========================================================================= */

.pleca-search-wrap {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pleca-search-form {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.pleca-search-main {
    display: flex;
    gap: 12px;
}

.pleca-search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.pleca-search-input:focus {
    border-color: #561D17;
    box-shadow: 0 0 0 2px rgba(86, 29, 23, 0.15);
}

.pleca-search-button {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    background: #561D17;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(86, 29, 23, 0.2);
    white-space: nowrap;
}

.pleca-search-button:hover {
    background: #3d1410;
    box-shadow: 0 2px 6px rgba(86, 29, 23, 0.25);
}

.pleca-search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Filters panel */

.pleca-filters-panel {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f1;
}

.pleca-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.pleca-filter-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #3c434a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pleca-filter-group select {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 5px;
    background: #fff;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.15s;
}

.pleca-filter-group select:focus {
    border-color: #561D17;
    outline: none;
    box-shadow: 0 0 0 1px #561D17;
}

/* Search notice */

#pleca-search-notice {
    margin-top: 16px;
}

#pleca-search-notice .pleca-notice {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

/* Results */

.pleca-results-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 24px 0 16px;
}

.pleca-results-header h3 {
    margin: 0;
    font-size: 17px;
    color: #1d2327;
}

.pleca-results-header h3 em {
    color: #561D17;
    font-style: normal;
}

.pleca-results-count {
    font-size: 13px;
    color: #999;
}

.pleca-search-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 15px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px dashed #ddd;
    margin-top: 20px;
}

/* Result cards */

.pleca-results-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pleca-result-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.15s, border-color 0.15s;
}

.pleca-result-card:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    border-color: #c3c4c7;
}

.pleca-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pleca-card-rank {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    background: #f6f7f7;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pleca-card-title {
    flex: 1;
}

.pleca-card-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.pleca-card-lugar {
    font-size: 13px;
    color: #999;
    margin-top: 2px;
    display: block;
}

.pleca-card-score {
    text-align: center;
    border: 2px solid;
    border-radius: 8px;
    padding: 8px 14px;
    flex-shrink: 0;
    min-width: 70px;
}

.pleca-score-pct {
    font-size: 18px;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.pleca-score-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.05em;
    display: block;
    margin-top: 2px;
}

.pleca-card-info {
    margin: 12px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* Tags */

.pleca-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f1;
}

.pleca-tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 20px;
    line-height: 1.5;
}

.pleca-tag-servicio {
    background: #dbeafe;
    color: #1e40af;
}

.pleca-tag-dominio {
    background: #dcfce7;
    color: #166534;
}

.pleca-tag-especializacion {
    background: #fef3c7;
    color: #92400e;
}

.pleca-tag-tematica {
    background: #f3e8ff;
    color: #6b21a8;
}

.pleca-tag-tipo-texto {
    background: #ffe4e6;
    color: #9f1239;
}

/* =========================================================================
   Pills (multi-select tags)
   ========================================================================= */

.pleca-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
    min-height: 20px;
}

.pleca-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: #561D17;
    background: #f5e6e5;
    border: 1px solid #e8ccc9;
    border-radius: 4px;
    white-space: nowrap;
}

.pleca-pill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    color: #999;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.pleca-pill-remove:hover {
    color: #fff;
    background: #b32d2e;
}

/* =========================================================================
    Hidden Relations (selectores de catálogo ocultos)
    ========================================================================= */

.pleca-hidden-relations {
    display: none;
}

/* =========================================================================
    Tipo Corrector (checkboxes)
    ========================================================================= */

.pleca-tipo-corrector-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.pleca-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1d2327;
    cursor: pointer;
}

.pleca-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #561D17;
    cursor: pointer;
}

#pleca-organismo-detalle {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fafafa;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
}

#pleca-organismo-detalle label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3c434a;
    margin-bottom: 6px;
}

/* =========================================================================
    Obras corregidas (rows dinámicas)
    ========================================================================= */

.pleca-obra-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #fafafa;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
}

.pleca-obra-fields {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pleca-obra-fields input[type="text"],
.pleca-obra-fields select {
    width: auto;
    flex: 1 1 120px;
    max-width: none;
    padding: 7px 10px;
    font-size: 13px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-sizing: border-box;
}

.pleca-obra-fields input[type="text"]:focus,
.pleca-obra-fields select:focus {
    border-color: #561D17;
    box-shadow: 0 0 0 1px #561D17;
    outline: none;
}

.pleca-obra-anio {
    flex: 0 1 80px !important;
}

.pleca-obra-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 2px 0 0;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    color: #999;
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.pleca-obra-remove:hover {
    color: #b32d2e;
    background: #f8d7da;
    border-color: #f5c6cb;
}

#pleca-add-obra {
    margin-top: 4px;
}

/* =========================================================================
    Debug Panel (buscador)
    ========================================================================= */

.pleca-debug-panel {
    margin-top: 20px;
    padding: 16px 20px;
    background: #1e1e2e;
    border: 1px solid #313244;
    border-radius: 8px;
    color: #cdd6f4;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    overflow: hidden;
}

.pleca-debug-panel h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #f38ba8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-bottom: 1px solid #313244;
    padding-bottom: 8px;
}

.pleca-debug-section {
    margin-bottom: 12px;
    color: #a6adc8;
    font-size: 12px;
}

.pleca-debug-section strong {
    color: #89b4fa;
}

.pleca-debug-table {
    background: #181825 !important;
    border-color: #313244 !important;
}

.pleca-debug-table th {
    background: #1e1e2e !important;
    color: #a6adc8 !important;
    border-color: #313244 !important;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 10px !important;
}

.pleca-debug-table td {
    border-color: #313244 !important;
    padding: 8px 10px !important;
    vertical-align: top;
}

.pleca-debug-table tr.pleca-debug-pass td {
    background: rgba(166, 227, 161, 0.06) !important;
}

.pleca-debug-table tr.pleca-debug-fail td {
    background: rgba(243, 139, 168, 0.04) !important;
}

.pleca-debug-table tr.pleca-debug-keyword-hit td {
    background: rgba(147, 51, 234, 0.10) !important;
    border-left: 3px solid #9333ea !important;
}

.pleca-debug-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pleca-debug-badge.pleca-debug-pass {
    background: #a6e3a1;
    color: #1e1e2e;
}

.pleca-debug-badge.pleca-debug-fail {
    background: #f38ba8;
    color: #1e1e2e;
}

.pleca-debug-text {
    margin: 0;
    padding: 6px 8px;
    background: #11111b;
    border: 1px solid #313244;
    border-radius: 4px;
    color: #bac2de;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 120px;
    overflow-y: auto;
}
