/**
 * ET Wiki v3.1 – Frontend Styles
 *
 * FIXES: No stacking context on plugin containers, no z-index,
 * no position:absolute/fixed/relative on ANY container element.
 * Larger images, larger share buttons, bigger text, light-red inputs.
 */

/* ══════════════════════════════════════
 * GLOBAL SAFETY: Ensure plugin elements
 * NEVER block theme clicks or navigation
 * ══════════════════════════════════════ */

.etw-required { color: #e05555; }

/* Honeypot: completely removed from layout flow */
.etw-hp {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important; width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important; padding: 0 !important;
}

/* FORM SAFETY: Force all form elements to be interactive.
 * Some themes apply pointer-events:none or user-select:none
 * to content areas. These overrides ensure forms always work. */
.etw-submission-box,
.etw-submission-box *,
.etw-submission-form,
.etw-submission-form input,
.etw-submission-form textarea,
.etw-submission-form select,
.etw-submission-form button,
.etw-submission-form label {
    pointer-events: auto !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
}

/* ══════════════════════════════════════
 * FORM ELEMENTS
 * Light-red bordered inputs, larger text
 * ══════════════════════════════════════ */

.etw-form-group { margin-bottom: 1.3rem; }
.etw-form-group label {
    display: block; font-weight: 600; margin-bottom: 0.45rem;
    font-size: 1.02rem; color: #333;
}

.etw-form-group input[type="text"],
.etw-form-group input[type="email"],
.etw-form-group input[type="number"],
.etw-form-group input[type="file"],
.etw-form-group textarea,
.etw-form-group select {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #f0b0b0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.55;
    color: #333;
    background-color: #fffafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.etw-form-group input:focus,
.etw-form-group textarea:focus,
.etw-form-group select:focus {
    border-color: #e05555;
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(224,85,85,0.12);
}

.etw-form-group textarea { resize: vertical; min-height: 120px; }
.etw-form-group select { cursor: pointer; }

.etw-form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.etw-form-group--half { flex: 1 1 calc(50% - 0.5rem); min-width: 200px; }
.etw-form-group--third { flex: 1 1 calc(33.333% - 0.667rem); min-width: 160px; }

/* ══════════════════════════════════════
 * BUTTONS (Light Red)
 * ══════════════════════════════════════ */

.etw-btn {
    display: inline-block; font-family: inherit;
    font-size: 1.05rem; font-weight: 700;
    padding: 0.8rem 2.2rem; border: none; border-radius: 6px;
    cursor: pointer; line-height: 1.4;
    transition: background-color 0.2s, transform 0.15s;
}
.etw-btn--primary { background-color: #e05555; color: #fff; }
.etw-btn--primary:hover { background-color: #c94444; color: #fff; transform: translateY(-1px); }
.etw-btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ══════════════════════════════════════
 * SUBMISSION BOX (all forms)
 * No position, no z-index — pure flow.
 * ══════════════════════════════════════ */

.etw-submission-box {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    background-color: #fff;
}
.etw-submission-box__title { margin: 0 0 1.3rem 0; font-size: 1.45rem; color: #222; }

/* Messages */
.etw-submission-box__message {
    padding: 0.85rem 1.1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 1rem;
}
.etw-message--success { background-color: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.etw-message--error   { background-color: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }

/* ══════════════════════════════════════
 * PROFILE / GAME CARD (Single Page)
 * Larger image, better spacing
 * ══════════════════════════════════════ */

.etw-profile-card {
    display: flex; gap: 2.2rem; margin-bottom: 2.5rem; flex-wrap: wrap;
}
.etw-profile-card__image {
    flex: 0 0 300px; max-width: 300px;
}
.etw-profile-card__img {
    width: 100%; height: auto;
    border-radius: 10px; display: block;
    cursor: pointer; transition: opacity 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.etw-profile-card__img:hover { opacity: 0.9; }
.etw-profile-card__body { flex: 1 1 0; min-width: 220px; }
.etw-profile-card__name {
    margin: 0 0 0.8rem 0; font-size: 2.1rem; line-height: 1.25;
}

/* ══════════════════════════════════════
 * INFO BOX TABLE
 * Light-red bold labels, increased text
 * ══════════════════════════════════════ */

.etw-info-box {
    background: #fff; border: 1px solid #ececec; border-radius: 8px;
    padding: 1.15rem 1.4rem; margin-top: 0.8rem;
}
.etw-info-table { width: 100%; border-collapse: collapse; }
.etw-info-table th {
    text-align: left; font-weight: 700;
    padding: 0.6rem 1.2rem 0.6rem 0; width: 140px;
    color: #e05555; font-size: 1.05rem;
    border-bottom: 1px solid #f4f4f4;
}
.etw-info-table td {
    padding: 0.6rem 0; font-size: 1.08rem; color: #333;
    border-bottom: 1px solid #f4f4f4;
}
.etw-info-table tr:last-child th,
.etw-info-table tr:last-child td { border-bottom: none; }

/* ══════════════════════════════════════
 * CONTENT AREA
 * ══════════════════════════════════════ */

.etw-content-area {
    margin-top: 1.8rem; font-size: 1.08rem; line-height: 1.8;
}
.etw-content-area p { margin-bottom: 1.15rem; }

/* ══════════════════════════════════════
 * BREADCRUMBS
 * ══════════════════════════════════════ */

.etw-breadcrumbs { font-size: 0.9rem; color: #888; margin-bottom: 1.5rem; }
.etw-breadcrumbs a { color: #e05555; text-decoration: none; }
.etw-breadcrumbs a:hover { text-decoration: underline; }
.etw-breadcrumbs .etw-bc-sep { margin: 0 0.4rem; color: #bbb; }

/* ══════════════════════════════════════
 * GALLERY – Larger thumbnails
 * ══════════════════════════════════════ */

.etw-gallery { margin-top: 2.5rem; }
.etw-gallery h3 { margin-bottom: 1rem; font-size: 1.25rem; }
.etw-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.85rem;
}
.etw-gallery__item {
    display: block; border-radius: 8px; overflow: hidden;
    border: 1px solid #eee;
}
.etw-gallery__item img {
    width: 100%; height: 190px; object-fit: cover;
    display: block; transition: transform 0.25s;
}
.etw-gallery__item:hover img { transform: scale(1.05); }

/* ══════════════════════════════════════
 * SOCIAL SHARE – Big branded buttons
 * ══════════════════════════════════════ */

.etw-social-share {
    margin: 2.5rem 0; padding: 1.5rem 0; border-top: 1px solid #eee;
}
.etw-social-share__title {
    font-size: 1.08rem; font-weight: 700; margin: 0 0 0.9rem; color: #333;
}
.etw-social-share__links { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.etw-social-share__links a {
    display: inline-flex; align-items: center; justify-content: center;
    height: 48px; min-width: 120px; padding: 0 20px;
    border-radius: 8px; color: #fff; text-decoration: none;
    font-size: 15px; font-weight: 700; letter-spacing: 0.3px;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}
.etw-social-share__links a:hover {
    opacity: 0.88; transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.14);
}
.etw-share-facebook  { background: #1877f2; }
.etw-share-twitter   { background: #000; }
.etw-share-linkedin  { background: #0a66c2; }
.etw-share-whatsapp  { background: #25d366; }
.etw-share-copy      { background: #555; cursor: pointer; }

/* ══════════════════════════════════════
 * RELATED CONTENT – 2-column, bigger titles
 * ══════════════════════════════════════ */

.etw-related { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #eee; }
.etw-related h3 { margin-bottom: 1.1rem; font-size: 1.3rem; }
.etw-related__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
}
.etw-related__item {
    text-decoration: none; color: inherit; display: block;
    border-radius: 10px; overflow: hidden; border: 1px solid #eee;
    transition: box-shadow 0.2s, transform 0.2s; background: #fff;
}
.etw-related__item:hover {
    box-shadow: 0 5px 18px rgba(0,0,0,0.08); transform: translateY(-3px);
}
.etw-related__thumb { height: 170px; overflow: hidden; background: #f5f5f5; }
.etw-related__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.etw-related__name {
    padding: 0.85rem 1rem; font-size: 1.1rem; font-weight: 700;
}

/* ══════════════════════════════════════
 * ARCHIVE GRID
 * ══════════════════════════════════════ */

.etw-archive-intro { font-size: 1.08rem; color: #666; max-width: 600px; margin: 0.5rem auto 0; }
.etw-archive-grid { margin-bottom: 2rem; }
.etw-archive-card {
    border: 1px solid #eee; border-radius: 10px; overflow: hidden;
    margin-bottom: 1.5rem; transition: box-shadow 0.2s, transform 0.2s; background: #fff;
}
.etw-archive-card:hover { box-shadow: 0 5px 18px rgba(0,0,0,0.08); transform: translateY(-2px); }
.etw-archive-card__link { display: block; text-decoration: none; color: inherit; }
.etw-archive-card__thumb {
    height: 220px; overflow: hidden; background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
}
.etw-archive-card__thumb--placeholder .dashicons { font-size: 48px; width: 48px; height: 48px; color: #ccc; }
.etw-archive-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.etw-archive-card__body { padding: 1.1rem 1.3rem; }
.etw-archive-card__title { margin: 0 0 0.3rem; font-size: 1.15rem; font-weight: 600; }
.etw-archive-card__subtitle { margin: 0; font-size: 0.9rem; color: #888; }

/* ══════════════════════════════════════
 * PAGINATION
 * ══════════════════════════════════════ */

.etw-pagination { text-align: center; margin-top: 2rem; }
.etw-pagination .nav-links { display: flex; justify-content: center; gap: 0.4rem; flex-wrap: wrap; }
.etw-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 0.6rem;
    border: 1px solid #ddd; border-radius: 6px; font-size: 0.95rem;
    text-decoration: none; color: #333; transition: all 0.2s;
}
.etw-pagination .page-numbers.current,
.etw-pagination .page-numbers:hover { background: #e05555; color: #fff; border-color: #e05555; }

/* ══════════════════════════════════════
 * RESPONSIVE
 * ══════════════════════════════════════ */

@media (max-width: 768px) {
    .etw-profile-card { flex-direction: column; align-items: center; text-align: center; }
    .etw-profile-card__image { flex: 0 0 auto; max-width: 240px; }
    .etw-profile-card__name { font-size: 1.6rem; }
    .etw-info-table th { width: 110px; font-size: 0.98rem; }
    .etw-info-table td { font-size: 1rem; }
    .etw-form-group--half, .etw-form-group--third { flex: 1 1 100%; }
    .etw-archive-card__thumb { height: 180px; }
    .etw-related__grid { grid-template-columns: 1fr; }
    .etw-related__thumb { height: 150px; }
    .etw-gallery__grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .etw-gallery__item img { height: 150px; }
    .etw-social-share__links a { height: 44px; min-width: 100px; padding: 0 14px; font-size: 13px; }
}

/* ══════════════════════════════════════
 * REVEAL ANSWER BUTTON
 * For Wordle / word game posts.
 * ══════════════════════════════════════ */

.etw-reveal-wrap {
    margin: 1.5rem 0;
}

.etw-reveal--center { text-align: center; }
.etw-reveal--left { text-align: left; }
.etw-reveal--right { text-align: right; }

.etw-reveal-btn {
    font-size: 1.1rem;
    padding: 0.85rem 2.5rem;
    border-radius: 8px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
}

.etw-reveal-btn:hover {
    transform: translateY(-2px);
}

.etw-reveal-btn[aria-expanded="true"] {
    opacity: 0.7;
    pointer-events: none;
}

.etw-reveal-answer {
    margin-top: 1rem;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f5e9 100%);
    border: 2px solid #c8e6c9;
    border-radius: 10px;
    display: inline-block;
    animation: etw-reveal-fade 0.4s ease;
}

.etw-reveal-answer__text {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #2e7d32;
    text-transform: uppercase;
}

@keyframes etw-reveal-fade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .etw-reveal-btn { font-size: 1rem; padding: 0.75rem 2rem; }
    .etw-reveal-answer__text { font-size: 1.4rem; letter-spacing: 3px; }
}
