/* ============================================================
   TheCoin – Custom Text  |  Frontend Styles
   ============================================================ */

/* ── Wrapper ── */
.tct-wrap {
    margin-bottom: 20px;
    font-family: 'Jost', 'Helvetica Neue', sans-serif;
}

/* ── Toggle Button ── */
.tct-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid #18130D;
    color: #18130D;
    font-family: inherit;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 11px 22px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.tct-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #18130D;
    transform: translateX(-101%);
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: -1;
}

.tct-toggle:hover::before,
.tct-toggle.active::before {
    transform: translateX(0);
}

.tct-toggle:hover,
.tct-toggle.active {
    color: #FDFAF3;
    border-color: #18130D;
}

.tct-toggle-icon {
    display: flex;
    align-items: center;
    line-height: 1;
    transition: color 0.3s;
}

.tct-toggle-arrow {
    font-size: 14px;
    line-height: 1;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s;
    margin-left: 2px;
}

.tct-toggle.active .tct-toggle-arrow {
    transform: rotate(180deg);
}

/* ── Input Area ── */
.tct-input-wrap {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease,
                margin 0.35s ease;
    margin-top: 0;
}

.tct-input-wrap.open {
    max-height: 160px;
    opacity: 1;
    margin-top: 14px;
}

.tct-input-inner {
    border: 1px solid #E6DCC4;
    background: #FDFAF3;
    padding: 18px 20px 16px;
}

/* ── Label ── */
.tct-label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #BF9B5A;
    margin-bottom: 10px;
    font-weight: 400;
}

/* ── Field Row ── */
.tct-field-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #E6DCC4;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

/* ── Text Input ── */
.tct-text-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 16px;
    font-weight: 400;
    color: #18130D;
    letter-spacing: 0.08em;
    padding: 0;
    width: 100%;
}

.tct-text-input::placeholder {
    color: #C8BBA8;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    letter-spacing: 0.12em;
    font-weight: 300;
}

/* ── Counter ── */
.tct-counter {
    flex-shrink: 0;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #9C8C76;
    font-weight: 300;
    min-width: 28px;
    text-align: right;
    transition: color 0.25s;
}

.tct-counter.at-limit {
    color: #BF9B5A;
    font-weight: 500;
}

/* ── Hint ── */
.tct-hint {
    font-size: 10.5px;
    color: #9C8C76;
    line-height: 1.6;
    margin: 0;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* ── Focus state ── */
.tct-field-row:focus-within {
    border-bottom-color: #BF9B5A;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .tct-toggle {
        width: 100%;
        justify-content: center;
    }
}
