/* Authyo Admin Modern Styles */

:root {
    --authyo-primary: #2271b1;
    --authyo-bg: #f0f0f1;
    --authyo-card-bg: #ffffff;
    --authyo-text: #3c434a;
    --authyo-border: #dcdcde;
}

.authyo-wrap {
    max-width: 1200px;
    margin: 20px 0;
}

.authyo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media screen and (max-width: 960px) {
    .authyo-grid {
        grid-template-columns: 1fr;
    }
}

.authyo-card {
    background: var(--authyo-card-bg);
    border: 1px solid var(--authyo-border);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 24px;
}

.authyo-card-header {
    border-bottom: 1px solid #f0f0f1;
    margin: -24px -24px 20px -24px;
    padding: 15px 24px;
    background: #fafafa;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.authyo-card-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600;
    color: #1d2327;
}

.authyo-card .form-table {
    margin: 0;
    width: 100%;
}

.authyo-card .form-table th {
    padding: 15px 10px 15px 0;
    width: 35%;
    font-weight: 500;
}

.authyo-card .form-table td {
    padding: 10px 0;
}

.authyo-card input[type="text"],
.authyo-card input[type="password"],
.authyo-card input[type="number"],
.authyo-card select,
.authyo-card textarea {
    width: 100%;
    max-width: 100%;
    height: 38px;
    border: 1px solid var(--authyo-border);
    border-radius: 4px;
    padding: 0 10px;
    box-shadow: none;
    transition: all 0.2s ease;
}

.authyo-card input:focus,
.authyo-card select:focus {
    border-color: var(--authyo-primary);
    box-shadow: 0 0 0 1px var(--authyo-primary);
}

/* Submit Section */
.authyo-footer-actions {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--authyo-border);
    border-radius: 8px;
    display: flex;
    justify-content: flex-end;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.authyo-footer-actions .button-primary {
    padding: 5px 25px;
    font-size: 15px;
}

/* --- Preserved & Improved Tag Styles --- */
.authyo-admin-tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--authyo-border);
    border-radius: 4px;
    min-height: 38px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.authyo-admin-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f0f6fc;
    color: #2271b1;
    border: 1px solid rgba(34, 113, 177, 0.2);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.authyo-tag-remove {
    margin-left: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: .5;
    color: #cc0000;
    opacity: 0.6;
}

.authyo-tag-remove:hover {
    opacity: 1;
}

.authyo-no-selection {
    color: #646970;
    font-style: italic;
    font-size: 13px;
    line-height: 24px;
}

.authyo-admin-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dcdcde;
    border-top: none;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.authyo-admin-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f1;
}

.authyo-admin-dropdown-item:hover {
    background: #f0f6fc;
}

.authyo-admin-dropdown-item.is-selected {
    background: #e5f5fa;
    color: #1d2327;
}

/* Base Form Improvements Override */
.authyo-otp-settings-form table.form-table th {
    width: 250px;
    padding: 20px 10px 20px 0;
}

/* Help Text Section */
.authyo-help-text {
    background-color: #f0f6fc;
    border: 1px solid rgba(34, 113, 177, 0.2);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--authyo-text);
}

.authyo-help-text .dashicons {
    color: var(--authyo-primary);
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.authyo-help-text a {
    color: var(--authyo-primary);
    text-decoration: none;
    font-weight: 500;
}

.authyo-help-text a:hover {
    text-decoration: underline;
}

/* Radio Group & Cards */
.authyo-radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 5px 0;
}

.authyo-radio-card {
    flex: 1;
    min-width: 100px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--authyo-border);
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.2s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.authyo-radio-card:hover {
    border-color: var(--authyo-primary);
    background: #f0f6fc;
}

.authyo-radio-card.is-selected {
    border-color: var(--authyo-primary);
    background: #e5f5fa;
    box-shadow: 0 0 0 1px var(--authyo-primary);
}

.authyo-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.authyo-radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.authyo-radio-content .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #646970;
}

.authyo-radio-card.is-selected .authyo-radio-content .dashicons {
    color: var(--authyo-primary);
}

.authyo-radio-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--authyo-text);
}

/* Checkbox Group & Cards */
.authyo-checkbox-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 5px 0;
}

.authyo-checkbox-card {
    flex: 1;
    min-width: 160px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--authyo-border);
    border-radius: 8px;
    padding: 15px 20px;
    transition: all 0.2s ease;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.authyo-checkbox-card:hover {
    border-color: var(--authyo-primary);
    background: #f0f6fc;
}

.authyo-checkbox-card.is-selected {
    border-color: var(--authyo-primary);
    background: #e5f5fa;
    box-shadow: 0 0 0 1px var(--authyo-primary);
}

.authyo-checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.authyo-checkbox-content {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.authyo-check-icon {
    width: 18px;
    height: 18px;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    display: inline-block;
    background: #fff;
    position: relative;
    transition: all 0.2s;
}

.authyo-checkbox-card.is-selected .authyo-check-icon {
    background: var(--authyo-primary);
    border-color: var(--authyo-primary);
}

.authyo-checkbox-card.is-selected .authyo-check-icon::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.authyo-checkbox-content .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #646970;
}

.authyo-checkbox-card.is-selected .authyo-checkbox-content .dashicons {
    color: var(--authyo-primary);
}

.authyo-checkbox-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--authyo-text);
}