/* ============================================================
   Mordomo Talents — Scouting Form Styles
   ============================================================ */

.mordomo-scouting-form-wrap {
    max-width: 840px;
    margin: 0 auto;
    font-family: inherit;
}

/* Alerts */
.mordomo-alert {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: .95rem;
    line-height: 1.5;
}
.mordomo-alert--success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.mordomo-alert--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Fieldsets */
.mordomo-fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #fafafa;
}
.mordomo-fieldset--compact {
    padding: 1rem 1.5rem;
}
.mordomo-legend {
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
    padding: 0 .5rem;
}

/* Grid */
.mordomo-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: .75rem;
}
.mordomo-row:last-child {
    margin-bottom: 0;
}
.mordomo-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 200px;
}
.mordomo-col-4  { flex: 1 1 calc(33.333% - .75rem); }
.mordomo-col-6  { flex: 1 1 calc(50% - .75rem); }
.mordomo-col-12 { flex: 1 1 100%; }

/* Labels & inputs */
.mordomo-field label {
    font-size: .85rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: .35rem;
}
.mordomo-field input[type="text"],
.mordomo-field input[type="email"],
.mordomo-field input[type="tel"],
.mordomo-field input[type="url"],
.mordomo-field input[type="date"],
.mordomo-field select,
.mordomo-field textarea {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: .95rem;
    color: #111827;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.mordomo-field input:focus,
.mordomo-field select:focus,
.mordomo-field textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.mordomo-input--invalid {
    border-color: #ef4444 !important;
}
.mordomo-field-error {
    font-size: .8rem;
    color: #dc2626;
    margin-top: .25rem;
}
.mordomo-required {
    color: #dc2626;
}
.mordomo-hint {
    font-size: .85rem;
    color: #6b7280;
    margin: 0 0 1rem;
}

/* Checkbox */
.mordomo-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .9rem;
    color: #374151;
    cursor: pointer;
    line-height: 1.5;
}
.mordomo-checkbox-label input[type="checkbox"] {
    margin-top: .2rem;
    flex-shrink: 0;
    accent-color: #6366f1;
    width: 1rem;
    height: 1rem;
}

/* Photos */
.mordomo-photos-row {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
}
.mordomo-photo-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 200px;
    max-width: 240px;
}
.mordomo-photo-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    width: 100%;
}
.mordomo-photo-preview {
    width: 200px;
    height: 240px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f3f4f6 center/cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background-color .2s;
    position: relative;
    overflow: hidden;
}
.mordomo-photo-preview:hover {
    border-color: #6366f1;
    background-color: #eef2ff;
}
.mordomo-photo-preview--loaded {
    border-style: solid;
    border-color: #6366f1;
}
.mordomo-photo-preview--ok {
    border-color: #10b981;
}
.mordomo-photo-icon {
    font-size: 2rem;
    opacity: .4;
}
.mordomo-photo-preview--loaded .mordomo-photo-icon {
    display: none;
}
.mordomo-photo-status {
    font-size: .78rem;
    color: #6b7280;
    text-align: center;
    padding: 0 .5rem;
}
.mordomo-photo-name {
    font-size: .85rem;
    color: #374151;
    font-weight: 500;
}

/* Submit */
.mordomo-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
}
.mordomo-btn {
    padding: .75rem 2.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}
.mordomo-btn--primary {
    background: #6366f1;
    color: #fff;
}
.mordomo-btn--primary:hover {
    background: #4f46e5;
}
.mordomo-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 600px) {
    .mordomo-col-4,
    .mordomo-col-6 {
        flex: 1 1 100%;
    }
    .mordomo-photos-row {
        flex-direction: column;
        align-items: center;
    }
}

/* ============================================================
   Mordomo Talents — Listagem e Ficha
   ============================================================ */

/* Menu de departamentos */
.mordomo-departments {
    margin: 0 0 2rem;
}
.mordomo-departments__list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mordomo-departments__link {
    display: inline-block;
    padding: .45rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: .9rem;
    line-height: 1.4;
    text-decoration: none;
    color: #374151;
    background: #fff;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mordomo-departments__link:hover,
.mordomo-departments__link:focus {
    background: #f3f4f6;
    border-color: #d1d5db;
}
.mordomo-departments__link.is-active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

/* Grelha de talentos */
.mordomo-talents-grid {
    display: grid;
    grid-template-columns: repeat(var(--mordomo-columns, 4), minmax(0, 1fr));
    gap: 1.5rem;
}
@media (max-width: 960px) {
    .mordomo-talents-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .mordomo-talents-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
    .mordomo-talents-grid { grid-template-columns: 1fr; }
}

.mordomo-talent-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.mordomo-talent-card__photo {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 6px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mordomo-talent-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.mordomo-talent-card__link:hover .mordomo-talent-card__photo img {
    transform: scale(1.04);
}
.mordomo-talent-card__placeholder {
    font-size: 2.5rem;
    opacity: .25;
}
.mordomo-talent-card__name {
    margin: .75rem 0 0;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Ficha do talento */
.mordomo-talent-profile__back {
    margin: 0 0 1.5rem;
    font-size: .9rem;
}
.mordomo-talent-profile__header {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.mordomo-talent-profile__photo {
    flex: 0 0 280px;
    max-width: 280px;
}
.mordomo-talent-profile__photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}
.mordomo-talent-profile__meta {
    flex: 1 1 260px;
}
.mordomo-talent-profile__name {
    margin: 0 0 .75rem;
    font-size: 2rem;
    line-height: 1.2;
}
.mordomo-talent-profile__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mordomo-talent-profile__tags li {
    padding: .25rem .7rem;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: .82rem;
    color: #4b5563;
}

/* Galeria */
.mordomo-talent-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
@media (max-width: 720px) {
    .mordomo-talent-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mordomo-talent-gallery__item {
    margin: 0;
}
.mordomo-talent-gallery__item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* Estado vazio */
.mordomo-empty {
    padding: 2rem 0;
    color: #6b7280;
    font-style: italic;
}

/* Aviso de diagnóstico (visível apenas a administradores) */
.mordomo-admin-hint {
    margin: 1rem 0;
    padding: .85rem 1.1rem;
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
    color: #78350f;
    font-size: .88rem;
    line-height: 1.5;
}
.mordomo-admin-hint code {
    background: rgba(0, 0, 0, .06);
    padding: .1rem .3rem;
    border-radius: 3px;
}
