/* ============================================================
   EmbedFlows — Admin Customization Page Styles
   ============================================================ */

/* ---- Main Container ---- */
.ef-custom {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.ef-custom__form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ---- Section Card ---- */
.ef-custom__section {
    background: rgba(24, 21, 38, 0.85);
    border: 1px solid rgba(124, 92, 255, 0.12);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ef-custom__section:hover {
    border-color: rgba(124, 92, 255, 0.25);
    box-shadow: 0 0 30px rgba(124, 92, 255, 0.06);
}

.ef-custom__section--logs {
    margin-top: 0.5rem;
}

/* ---- Section Header ---- */
.ef-custom__section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ef-custom__section-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: rgba(124, 92, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a29bfe;
}

.ef-custom__section-icon--green {
    background: rgba(74, 222, 128, 0.12);
    color: #4ADE80;
}

.ef-custom__section-icon--blue {
    background: rgba(56, 189, 248, 0.12);
    color: #38BDF8;
}

.ef-custom__section-icon--amber {
    background: rgba(251, 191, 36, 0.12);
    color: #FBBF24;
}

.ef-custom__section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.3rem;
    letter-spacing: -0.01em;
}

.ef-custom__section-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    line-height: 1.5;
}

.ef-custom__section-desc a {
    text-decoration: none;
}
.ef-custom__section-desc a:hover {
    text-decoration: underline;
}

/* ---- Fields ---- */
.ef-custom__field {
    margin-bottom: 1.75rem;
}

.ef-custom__field:last-child {
    margin-bottom: 0;
}

.ef-custom__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.4rem;
}

.ef-custom__label svg {
    color: #7C5CFF;
    opacity: 0.7;
}

.ef-custom__hint {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    margin: 0 0 0.65rem;
    line-height: 1.5;
}

.ef-custom__hint a {
    text-decoration: none;
}
.ef-custom__hint a:hover {
    text-decoration: underline;
}

.ef-custom__hint code {
    background: rgba(124, 92, 255, 0.15);
    color: #a29bfe;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.82em;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.ef-custom__input,
.ef-custom__textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 13, 24, 0.7);
    border: 1px solid rgba(124, 92, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
    box-sizing: border-box;
}

.ef-custom__textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.ef-custom__input::placeholder,
.ef-custom__textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.ef-custom__input:focus,
.ef-custom__textarea:focus {
    border-color: rgba(124, 92, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
}

/* ---- API Key Input Wrap ---- */
.ef-custom__input-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.ef-custom__input--key {
    padding-right: 3rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.84rem;
    letter-spacing: 0.02em;
}

.ef-custom__key-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.ef-custom__key-toggle:hover {
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

/* ---- Live Preview ---- */
.ef-custom__preview {
    margin-top: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.ef-custom__preview-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 0.55rem;
    min-width: 55px;
}

.ef-custom__preview-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.45;
    flex: 1;
    max-width: 400px;
}

.ef-custom__preview-toast--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 3px solid rgba(239, 68, 68, 0.6);
    color: rgba(255, 255, 255, 0.75);
}

.ef-custom__preview-icon {
    color: #ef4444;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.45;
    flex-shrink: 0;
}

.ef-custom__preview-text {
    word-break: break-word;
}

/* ---- Domain Tags ---- */
.ef-custom__domain-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.ef-custom__domain-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 500;
    color: #4ADE80;
    letter-spacing: 0.01em;
}

/* ============================================================
   Toggle Switch
   ============================================================ */
.ef-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.ef-toggle input[type="checkbox"] {
    display: none;
}

.ef-toggle__slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.ef-toggle__slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: transform 0.3s ease, background 0.3s ease;
}

.ef-toggle input:checked + .ef-toggle__slider {
    background: rgba(74, 222, 128, 0.25);
    border-color: rgba(74, 222, 128, 0.35);
}

.ef-toggle input:checked + .ef-toggle__slider::after {
    transform: translateX(20px);
    background: #4ADE80;
}

.ef-toggle__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ef-toggle input:checked ~ .ef-toggle__label {
    color: #4ADE80;
}

/* ---- Reoon Settings Block ---- */
.ef-reoon-settings {
    transition: opacity 0.35s ease;
}

/* ============================================================
   Mode Selection Cards
   ============================================================ */
.ef-mode-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.ef-mode-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    background: rgba(15, 13, 24, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    user-select: none;
}

.ef-mode-card:hover {
    border-color: rgba(124, 92, 255, 0.2);
    background: rgba(15, 13, 24, 0.8);
}

.ef-mode-card--active {
    border-color: rgba(124, 92, 255, 0.45) !important;
    background: rgba(124, 92, 255, 0.06) !important;
    box-shadow: 0 0 20px rgba(124, 92, 255, 0.08);
}

.ef-mode-card input[type="radio"] {
    display: none;
}

.ef-mode-card__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.ef-mode-card__body {
    flex: 1;
    min-width: 0;
}

.ef-mode-card__title {
    font-weight: 700;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.2rem;
}

.ef-mode-card__desc {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.4;
}

.ef-mode-card__check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
    color: transparent;
}

.ef-mode-card--active .ef-mode-card__check {
    background: #7C5CFF;
    border-color: #7C5CFF;
    color: #fff;
}

/* ============================================================
   Save Actions
   ============================================================ */
.ef-custom__actions {
    display: flex;
    justify-content: flex-end;
}

.ef-custom__save {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, #7C5CFF, #6C4FE0);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    letter-spacing: 0.01em;
}

.ef-custom__save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(124, 92, 255, 0.35);
    background: linear-gradient(135deg, #8B6FFF, #7C5CFF);
}

.ef-custom__save:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.25);
}

/* ============================================================
   Verification Logs
   ============================================================ */
.ef-logs__count {
    flex-shrink: 0;
    padding: 0.3rem 0.7rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #FBBF24;
    align-self: center;
}

.ef-logs__empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    line-height: 1.6;
}

.ef-logs__empty svg {
    margin-bottom: 0.75rem;
}

.ef-logs__table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.ef-logs__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.ef-logs__table thead {
    background: rgba(15, 13, 24, 0.6);
}

.ef-logs__table th {
    padding: 0.7rem 0.9rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.ef-logs__table td {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.ef-logs__table tbody tr:hover {
    background: rgba(124, 92, 255, 0.03);
}

.ef-logs__table tbody tr:last-child td {
    border-bottom: none;
}

.ef-logs__time {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.76rem;
}

.ef-logs__email {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status Badges */
.ef-logs__badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ef-logs__badge--valid {
    background: rgba(74, 222, 128, 0.12);
    color: #4ADE80;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.ef-logs__badge--invalid {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.ef-logs__badge--disposable {
    background: rgba(251, 146, 60, 0.12);
    color: #FB923C;
    border: 1px solid rgba(251, 146, 60, 0.2);
}

.ef-logs__badge--warning {
    background: rgba(251, 191, 36, 0.12);
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.ef-logs__badge--error {
    background: rgba(168, 85, 247, 0.12);
    color: #A855F7;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.ef-logs__badge--unknown {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Mode badge */
.ef-logs__mode {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(56, 189, 248, 0.08);
    color: rgba(56, 189, 248, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.12);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Result */
.ef-logs__result {
    font-size: 0.76rem;
    font-weight: 600;
}

.ef-logs__result--accepted {
    color: #4ADE80;
}

.ef-logs__result--rejected {
    color: #EF4444;
}

.ef-logs__source {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .ef-custom__section {
        padding: 1.25rem;
    }

    .ef-custom__section-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .ef-custom__preview {
        flex-direction: column;
        gap: 0.4rem;
    }

    .ef-custom__preview-toast {
        max-width: 100%;
    }

    .ef-mode-cards {
        grid-template-columns: 1fr;
    }

    .ef-logs__table-wrap {
        margin: 0 -1rem;
        border-radius: 0;
    }
}
