/* =====================================================
   GT Addon Admin — Design System
   Escoped under .gt-app para no interferir con WP admin
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Reset base del .wrap de WP ---------- */
#wpwrap {
    background: #E9E9E9;
}

#wpcontent,
#wpbody-content {
    background: #E9E9E9;
}

.gt-app .wrap {
    font-family: 'Inter', sans-serif !important;
}

/* ---------- Contenedor principal ---------- */
.gt-app {
    font-family: 'Inter', -apple-system, sans-serif;
    color: #222222;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* =====================================================
   SECTION 1 — HEADER
   ===================================================== */
.gt-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gt-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #222222;
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.gt-header p {
    font-size: 13px;
    color: #888;
    margin: 0;
    font-weight: 400;
}

/* =====================================================
   SECTION 2 — CONTROL STRIP
   ===================================================== */
.gt-control-strip {
    background: #3A4750;
    border-radius: 10px;
    padding: 14px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.gt-control-strip-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gt-control-strip-left .material-symbols-outlined {
    color: rgba(255, 255, 255, 0.75);
    font-size: 20px;
}

.gt-control-strip label {
    color: white;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    margin: 0;
}

.gt-lang-select {
    appearance: none;
    background: rgba(255, 255, 255, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: white;
    padding: 8px 36px 8px 12px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    width: 220px;
    cursor: pointer;
    transition: background 0.2s;
    outline: none;
}

.gt-lang-select:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.gt-lang-select:focus {
    box-shadow: 0 0 0 2px #DD5656;
}

.gt-lang-select option {
    color: #222222;
    background: #fff;
}

/* =====================================================
   LAYOUT GRIDS
   ===================================================== */
.gt-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .gt-grid-2 {
        grid-template-columns: 1fr;
    }

    .gt-lang-select {
        width: 100%;
    }
}

/* =====================================================
   CARDS
   ===================================================== */
.gt-card-new {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-top: 3px solid #DD5656;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.gt-card-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-top: 3px solid #2F67CA;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gt-card-utility {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-top: 3px solid #3A4750;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* Card headers */
.gt-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.gt-card-header .material-symbols-outlined {
    font-size: 22px;
}

.gt-card-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.gt-card-header-icon-red {
    color: #DD5656;
}

.gt-card-header-icon-blue {
    color: #2F67CA;
}

.gt-card-header-icon-dark {
    color: #3A4750;
}

/* List card header (inside padding) */
.gt-list-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gt-list-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gt-list-count {
    background: #f0f0f0;
    color: #555;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
}

/* =====================================================
   FORM ELEMENTS
   ===================================================== */
.gt-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.gt-field label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
}

.gt-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #222;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.gt-input:focus {
    border-color: #DD5656;
    box-shadow: 0 0 0 3px rgba(221, 86, 86, 0.12);
}

.gt-input::placeholder {
    color: #aaa;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.gt-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #DD5656;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    margin-top: auto;
}

.gt-btn-primary:hover {
    background: #2F67CA;
    color: white;
}

.gt-btn-outline-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: #2F67CA;
    border: 1px solid #2F67CA;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    width: 100%;
}

.gt-btn-outline-blue:hover {
    background: #2F67CA;
    color: white;
}

.gt-btn-outline-red {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: #DD5656;
    border: 1px solid #DD5656;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-top: 12px;
}

.gt-btn-outline-red:hover {
    background: #DD5656;
    color: white;
}

.gt-btn-icon {
    background: #DD5656;
    border: none;
    border-radius: 8px;
    color: white;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.gt-btn-icon:hover {
    background: #2F67CA;
}

.gt-btn-icon-blue {
    background: #2F67CA;
    border: none;
    border-radius: 8px;
    color: white;
    padding: 8px 14px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.gt-btn-icon-blue:hover {
    background: #245bb5;
}

.gt-btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
}

.gt-btn-delete:hover {
    color: #DD5656;
}

/* =====================================================
   TABLE
   ===================================================== */
.gt-table-wrap {
    overflow-x: auto;
    width: 100%;
}

.gt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.gt-table thead tr {
    background: #3A4750;
}

.gt-table thead th {
    color: white;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    text-align: left;
}

.gt-table thead th:last-child {
    text-align: right;
}

.gt-table tbody tr:nth-child(odd) {
    background: #fff;
}

.gt-table tbody tr:nth-child(even) {
    background: rgba(233, 233, 233, 0.4);
}

.gt-table tbody tr:hover {
    background: #f5f5f5;
}

.gt-table tbody td {
    padding: 10px 20px;
    vertical-align: middle;
}

.gt-table tbody td:first-child {
    font-weight: 500;
    color: #222;
}

.gt-table tbody td:nth-child(2) {
    color: #666;
}

.gt-table tbody td:last-child {
    text-align: right;
}

.gt-empty-state {
    text-align: center;
    padding: 32px 20px;
    color: #aaa;
    font-size: 13px;
}

/* =====================================================
   IMPORT / EXPORT — sub-sections
   ===================================================== */
.gt-sub-section {
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.gt-sub-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px;
}

.gt-sub-section p {
    font-size: 12px;
    color: #888;
    margin: 0 0 12px;
}

.gt-inline-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.gt-inline-row .gt-input {
    margin: 0;
}

.gt-select {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #222;
    background: #fff;
    outline: none;
}

.gt-select:focus {
    border-color: #2F67CA;
    box-shadow: 0 0 0 2px rgba(47, 103, 202, 0.1);
}

.gt-file-input {
    border: 1.5px dashed #ccc;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    background: #fafafa;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* =====================================================
   CHIPS — Containers
   ===================================================== */
.gt-desc {
    font-size: 12px;
    color: #888;
    margin: 0 0 20px;
    line-height: 1.5;
}

.gt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

.gt-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E9E9E9;
    border: 1px solid #ddd;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px 5px 12px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
}

.gt-chip-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #aaa;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.gt-chip-delete:hover {
    color: #DD5656;
    background: rgba(221, 86, 86, 0.08);
}

.gt-chip-delete .material-symbols-outlined {
    font-size: 14px;
}

/* =====================================================
   MATERIAL SYMBOLS
   ===================================================== */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* =====================================================
   TABLA DE TRADUCCIONES — scroll interno
   ===================================================== */
.gt-table-wrap {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #E9E9E9;
}

/* Scrollbar fina */
.gt-table-wrap::-webkit-scrollbar {
    width: 5px;
}

.gt-table-wrap::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.gt-table-wrap::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.gt-table-wrap::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.gt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.gt-table thead th {
    position: sticky;
    top: 0;
    background: #3A4750;
    color: #fff;
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
    z-index: 1;
}

.gt-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.12s;
}

.gt-table tbody tr:last-child {
    border-bottom: none;
}

.gt-table tbody tr:hover {
    background: #f8f9ff;
}

.gt-table tbody td {
    padding: 9px 14px;
    color: #333;
    vertical-align: middle;
    word-break: break-word;
}