/* AOS Match — Frontend styles (shortcodes de registro y directorio) */
:root {
    --aos-primary: #2271b1;
    --aos-primary-dk: #135e96;
    --aos-success: #107c10;
    --aos-danger: #d63638;
    --aos-warning: #ffb900;
    --aos-card: #ffffff;
    --aos-border: #c3c4c7;
    --aos-border-light: #dcdcde;
    --aos-text: #1d2327;
    --aos-muted: #50575e;
    --aos-radius: 4px;
    --aos-radius-lg: 6px;
}

.aos-match-frontend {
    max-width: 720px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var( --aos-text );
}

.aos-match-card {
    background: var( --aos-card );
    border: 1px solid var( --aos-border );
    border-radius: var( --aos-radius-lg );
    box-shadow: 0 1px 2px rgba( 0, 0, 0, .05 );
    padding: 20px;
    margin-bottom: 20px;
}

.aos-match-card h3 {
    margin-top: 0;
}

.aos-match-notice {
    border-radius: var( --aos-radius );
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 4px solid var( --aos-border );
}
.aos-match-notice p { margin: 0; }
.aos-match-notice-success { background: #edfaef; border-left-color: var( --aos-success ); }
.aos-match-notice-error   { background: #fef2f2; border-left-color: var( --aos-danger ); }
.aos-match-notice-warning { background: #fff8e5; border-left-color: var( --aos-warning ); }
.aos-match-notice-info    { background: #f0f6fc; border-left-color: var( --aos-primary ); }

.aos-match-field { margin-bottom: 14px; }
.aos-match-field legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.aos-match-field label { display: block; margin-bottom: 6px; font-weight: 600; }
.aos-match-field fieldset label { font-weight: 400; display: inline-block; margin-right: 16px; }

.aos-match-input {
    width: 100%;
    max-width: 460px;
    padding: 8px 10px;
    border: 1px solid var( --aos-border );
    border-radius: var( --aos-radius );
    box-sizing: border-box;
}

.aos-match-help {
    color: var( --aos-muted );
    font-size: .88em;
    margin: 4px 0 0;
}

.aos-match-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var( --aos-radius );
    border: 1px solid var( --aos-border );
    background: #f6f7f7;
    color: var( --aos-text ); /* explícito: no depender del color de botón del tema */
    cursor: pointer;
    font-size: .95em;
    line-height: 1.4;
    text-decoration: none;
}
.aos-match-button:hover {
    background: #e9eaeb;
    color: var( --aos-text );
    border-color: var( --aos-border );
}
.aos-match-button-primary {
    background: var( --aos-primary );
    border-color: var( --aos-primary );
    color: #fff;
}
.aos-match-button-primary:hover {
    background: var( --aos-primary-dk );
    color: #fff;
    border-color: var( --aos-primary-dk );
}
/* Acciones negativas (rechazar/cancelar): contorno en rojo, nunca un botón
   "neutro" indistinguible — pero tampoco un rojo sólido tan fuerte como
   Eliminar, porque rechazar/cancelar sigue siendo una decisión legítima. */
.aos-match-button-danger {
    background: #fff;
    border-color: var( --aos-danger );
    color: var( --aos-danger );
}
.aos-match-button-danger:hover {
    background: var( --aos-danger );
    color: #fff;
    border-color: var( --aos-danger );
}

.aos-match-button-link {
    background: none;
    border: none;
    padding: 0;
    color: var( --aos-danger );
    cursor: pointer;
    font-size: .85em;
    text-decoration: underline;
}

.aos-match-listings-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.aos-match-listing-item {
    border-top: 1px solid var( --aos-border-light );
    padding: 12px 0;
}
.aos-match-listings-list > .aos-match-listing-item:first-child {
    border-top: none;
    padding-top: 0;
}
.aos-match-listing-item p { margin: 6px 0 0; color: var( --aos-muted ); }
.aos-match-inline-delete { display: inline; margin-left: 10px; }

.aos-match-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: .72em;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 8px;
}
.aos-match-badge-offer  { background: #e6f4ea; color: #1e7b34; }
.aos-match-badge-demand { background: #eaf1fb; color: var( --aos-primary-dk ); }

.aos-match-topic-pill {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f0f0f1;
    color: var( --aos-muted );
    font-size: .78em;
}

.aos-match-request-form {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
}
.aos-match-request-select {
    padding: 4px 8px;
    border-radius: var( --aos-radius );
    border: 1px solid var( --aos-border );
    max-width: 260px;
}
.aos-match-button-small {
    padding: 5px 12px;
    font-size: .85em;
}

.aos-match-status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: .78em;
    font-weight: 700;
    background: #f0f0f1;
    color: var( --aos-muted );
    margin-right: 8px;
}
.aos-match-status-pending   { background: #fff8e5; color: #8a6100; }
.aos-match-status-confirmed { background: #edfaef; color: #1e7b34; }
.aos-match-status-cancelled { background: #fef2f2; color: #9b1c1c; }

.aos-match-badge-action {
    background: #ffe4e6;
    color: #9b1c1c;
}

.aos-match-meeting-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.aos-match-inline-form { display: inline; }

.aos-match-message-date {
    color: var( --aos-muted );
    font-size: .8em;
}
.aos-match-attachment { font-size: .9em; margin: 6px 0 0; }

/* Chat de la reunión — burbujas, mensaje propio a la derecha */
.aos-match-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    max-height: 440px;
    overflow-y: auto;
    padding: 4px 2px;
}
.aos-match-chat-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 80%;
}
.aos-match-chat-row-mine {
    flex-direction: row-reverse;
    align-self: flex-end;
    margin-left: auto;
}
.aos-match-chat-avatar {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var( --aos-border-light );
    color: var( --aos-text );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8em;
    font-weight: 700;
}
.aos-match-chat-row-mine .aos-match-chat-avatar {
    background: var( --aos-primary );
    color: #fff;
}
.aos-match-chat-bubble {
    background: #f0f0f1;
    color: var( --aos-text );
    border-radius: 14px;
    padding: 10px 14px;
}
.aos-match-chat-row-mine .aos-match-chat-bubble {
    background: var( --aos-primary );
    color: #fff;
}
.aos-match-chat-text {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}
.aos-match-chat-time {
    display: block;
    margin-top: 4px;
    font-size: .72em;
    opacity: .75;
}
.aos-match-chat-row-mine .aos-match-attachment a { color: #fff; }

/* Documentación privada — tarjetas con estado de privacidad */
.aos-match-notes-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}
.aos-match-note-card {
    border: 1px solid var( --aos-border-light );
    border-radius: var( --aos-radius );
    padding: 12px 14px;
    margin-bottom: 10px;
}
.aos-match-note-card p { margin: 6px 0 0; }
.aos-match-share-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: .72em;
    font-weight: 700;
    margin-right: 8px;
}
.aos-match-share-badge-private { background: #f0f0f1; color: var( --aos-muted ); }
.aos-match-share-badge-shared  { background: #edfaef; color: #1e7b34; }

.aos-match-directory-filter {
    margin-bottom: 16px;
}
.aos-match-directory-filter select {
    padding: 6px 10px;
    border-radius: var( --aos-radius );
    border: 1px solid var( --aos-border );
}
.aos-match-directory-note {
    text-align: center;
    font-style: italic;
}

/* Tarjetas de selección (p. ej. "Representa" en el perfil del foro) —
   input radio real por accesibilidad/progressive enhancement, oculto
   visualmente y sustituido por la tarjeta como superficie de clic. */
.aos-match-choice-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}
.aos-match-choice-card {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 220px;
    padding: 12px 16px;
    border: 2px solid var( --aos-border );
    border-radius: var( --aos-radius-lg );
    background: var( --aos-card );
    cursor: pointer;
    font-weight: 400;
    margin: 0;
    transition: border-color .15s ease, background .15s ease;
}
.aos-match-choice-card:hover {
    border-color: var( --aos-primary );
}
.aos-match-choice-card.is-selected {
    border-color: var( --aos-primary );
    background: #f0f6fc;
    font-weight: 600;
}
.aos-match-choice-card-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect( 0, 0, 0, 0 );
    white-space: nowrap;
    border: 0;
}
.aos-match-choice-card-title {
    line-height: 1.3;
}
.aos-match-save-status {
    display: inline-block;
    margin-top: 6px;
    font-size: .82em;
    color: var( --aos-muted );
    min-height: 1.2em;
}

/* Submenú de navegación arriba de "Mis Reuniones" — directorio / registro */
.aos-match-submenu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

/* Fecha/sala agendada — reunión confirmed con franja asignada */
.aos-match-scheduled-info {
    margin: 6px 0 0;
    font-size: .9em;
    font-weight: 600;
    color: #1e7b34;
}
.aos-match-scheduled-info-pending {
    font-weight: 400;
    color: var( --aos-muted );
    font-style: italic;
}
