/* Instant Emoji Reactions — Admin pages */

.ier-admin-wrap {
    max-width: 1100px;
}

.ier-admin-header {
    margin-bottom: 24px;
}

.ier-admin-header .wp-heading-inline {
    margin-bottom: 6px;
}

.ier-admin-subtitle {
    margin: 0;
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
}

/* Sections */

.ier-admin-section {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    overflow: hidden;
}

.ier-admin-section__header {
    background: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
    padding: 18px 24px;
}

.ier-admin-section__header h2 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #1d2327;
}

.ier-admin-section__header p {
    margin: 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.5;
}

.ier-admin-section__body {
    padding: 20px 24px 24px;
}

.ier-admin-section__body > h2 {
    margin: 0 0 8px;
    padding-bottom: 14px;
    border-bottom: 1px solid #dcdcde;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.ier-admin-section__body > p {
    margin: 0 0 16px;
    color: #646970;
    font-size: 13px;
}

.ier-admin-section__body .form-table {
    margin-top: 0;
}

.ier-admin-section__body .form-table th {
    width: 220px;
    padding-left: 0;
    font-weight: 600;
    color: #1d2327;
}

.ier-admin-section__body .form-table td {
    padding-right: 0;
}

.ier-admin-section__body .submit {
    margin-bottom: 0;
    padding-bottom: 0;
}

.ier-display-settings-form > h2,
.ier-display-settings-form > h2 + p {
    display: none;
}

.ier-display-settings-form .form-table {
    margin-top: 0;
}

/* Emoji picker grid */

.ier-emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.ier-emoji-grid__item label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    color: #1d2327;
}

.ier-emoji-grid__item select {
    min-width: 100%;
    max-width: 220px;
    font-size: 18px;
    line-height: 1.4;
    padding: 6px 10px;
}

/* Display settings fields */

.ier-checkbox-label,
.ier-radio-label {
    display: block;
    margin-bottom: 8px;
    line-height: 1.5;
}

.ier-post-type-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 4px 16px;
    margin-bottom: 8px;
}

.ier-position-options {
    border: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin: 0;
    padding: 0;
}

.ier-position-options .ier-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

#instant_emoji_reactions_post_types_wrapper {
    border: 0;
    margin: 0;
    padding: 0;
}

/* Help & tutorial */

.ier-admin-section--help .ier-shortcode-box {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    color: #1d2327;
    display: inline-block;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    margin: 12px 0 16px;
    padding: 10px 16px;
}

.ier-admin-section--help ul {
    list-style: disc;
    margin: 0 0 16px 20px;
    color: #3c434a;
}

.ier-admin-section--help li {
    margin-bottom: 6px;
}

.ier-admin-video {
    border-radius: 8px;
    display: block;
    max-width: 100%;
    width: 640px;
    border: 1px solid #dcdcde;
    background: #000;
}

/* Page header actions (Settings, Analytics, etc.) */

.ier-admin-wrap .ier-admin-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
    position: relative;
    top: -3px;
    vertical-align: middle;
}

.ier-admin-wrap .ier-admin-header-actions .page-title-action {
    align-items: center;
    display: inline-flex;
    gap: 4px;
    margin-left: 0;
    top: 0;
    vertical-align: middle;
}

.ier-admin-wrap .ier-admin-header-actions .page-title-action .dashicons {
    font-size: 16px;
    height: 16px;
    width: 16px;
}

/* Analytics */

.ier-admin-wrap--analytics .ier-admin-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.ier-admin-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.ier-admin-card {
    background: linear-gradient(180deg, #f9fafb 0%, #fff 100%);
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 20px 22px;
    text-align: center;
}

.ier-admin-card__label {
    color: #646970;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.ier-admin-card__value {
    color: #2271b1;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 8px;
}

.ier-admin-card__meta {
    color: #646970;
    font-size: 12px;
    margin: 0;
}

.ier-admin-badge {
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 999px;
    color: #2271b1;
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    padding: 2px 10px;
    vertical-align: middle;
}

.ier-admin-table-wrap {
    overflow-x: auto;
}

.ier-admin-table-wrap .widefat {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    border-spacing: 0;
    overflow: hidden;
}

.ier-admin-table-wrap .widefat thead th {
    background: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
    font-weight: 600;
}

.ier-admin-table-wrap .widefat td,
.ier-admin-table-wrap .widefat th {
    padding: 12px 14px;
}

.ier-admin-table-wrap .widefat td a {
    word-break: break-all;
}

.ier-admin-table-wrap .column-reactions {
    text-align: right;
    width: 120px;
}

.ier-admin-empty {
    color: #646970;
    font-style: italic;
    margin: 0;
    padding: 8px 0;
}

@media screen and (max-width: 782px) {
    .ier-admin-section__header,
    .ier-admin-section__body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ier-admin-section__body .form-table th {
        display: block;
        padding-bottom: 4px;
        width: auto;
    }

    .ier-admin-section__body .form-table td {
        display: block;
        padding-left: 0;
        padding-top: 0;
    }

    .ier-post-type-list {
        grid-template-columns: 1fr;
    }
}
