input[type="text"] {
    margin-bottom: 0;
    width: 300px;
}
#url-fields input[type="text"] {
    margin-bottom: 15px;
}
.wp-list-table input[type="text"] {
    margin-bottom: 15px;
    width: 200px;
}
.form-table th {
    width: 120px;
}
button.rlc-add-url,
button.rlc-remove-url,
button.rlc-edit,
button.rlc-saved,
button.rlc-trash {
    background: none;
    border: none;
    color: #2271b1;
    display: inline-block;
    padding: 0;
    font-size: 13px;
    vertical-align: baseline;
    width: 20px;
}
button.rlc-add-url {
    margin: -4px;
}
button.rlc-remove-url,
button.rlc-trash {
    color: #b12222;
}

button .dashicons {
    font-size: 13px;
    vertical-align: bottom;
}
button .dashicons.dashicons-saved {
    font-size: 17px;
    vertical-align: sub;
}
.edit-urls {
    position: relative;
    padding-bottom: 30px;
}
.add-edit-url.button {
    position: absolute;
    bottom: 0;
    right: 0;
}

.notification {
    position: fixed;
    top: 40px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 4px;
    color: #fff;
    display: none;
    z-index: 10000;
}
.notification.success {
    background-color: #4CAF50;
}
.notification.error {
    background-color: #F44336;
}

.display-auth-token {
    padding: 6px 10px;
}
input[type="text"] {
    margin-bottom: 0;
    width: 300px;
}
#url-fields input[type="text"] {
    margin-bottom: 15px;
}
.wp-list-table input[type="text"] {
    margin-bottom: 15px;
    width: 200px;
}
.form-table th {
    width: 120px;
}
button.rlc-add-url,
button.rlc-remove-url,
button.rlc-edit,
button.rlc-saved,
button.rlc-trash {
    background: none;
    border: none;
    color: #2271b1;
    display: inline-block;
    padding: 0;
    font-size: 13px;
    vertical-align: baseline;
    width: 20px;
}
button.rlc-add-url {
    margin: -4px;
}
button.rlc-remove-url,
button.rlc-trash {
    color: #b12222;
}
button .dashicons {
    font-size: 13px;
    vertical-align: bottom;
}
button .dashicons.dashicons-saved {
    font-size: 17px;
    vertical-align: sub;
}
.edit-urls {
    position: relative;
    padding-bottom: 30px;
}
.add-edit-url.button {
    position: absolute;
    bottom: 0;
    right: 0;
}
.notification {
    position: fixed;
    top: 40px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 4px;
    color: #fff;
    display: none;
    z-index: 10000;
}
.notification.success {
    background-color: #4CAF50;
}
.notification.error {
    background-color: #F44336;
}
.display-auth-token {
    padding: 6px 10px;
}

/* OAuth status styles */
.oauth-status-cell {
    min-width: 200px;
}
.oauth-provider-status {
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}
.oauth-provider-status .provider-name {
    font-weight: 600;
    min-width: 80px;
}
.oauth-status-connected .status-text {
    color: #46b450;
}
.oauth-status-expired .status-text {
    color: #ff9800;
}
.oauth-status-not_connected .status-text {
    color: #999;
}
.rlc-oauth-authenticate,
.rlc-oauth-refresh {
    font-size: 12px;
    text-decoration: none;
    margin-left: 5px;
}
.rlc-oauth-authenticate:hover,
.rlc-oauth-refresh:hover {
    text-decoration: underline;
}

/* OAuth callback page styles */
.rlc-oauth-callback-error,
.rlc-oauth-callback-success {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.rlc-oauth-callback-success {
    background: #f0f8ff;
    border: 1px solid #4CAF50;
}
.rlc-oauth-callback-error {
    background: #fff5f5;
    border: 1px solid #F44336;
}
.rlc-oauth-callback-block {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Block editor styles */
.rlc-oauth-callback-editor {
    padding: 20px;
    background: #f9f9f9;
    border: 2px dashed #ccc;
    border-radius: 4px;
    min-height: 200px;
}
.rlc-oauth-callback-editor h3 {
    margin-top: 0;
}
.rlc-oauth-callback-editor code {
    background: #fff;
    padding: 2px 5px;
    border-radius: 3px;
    word-break: break-all;
}
.rlc-oauth-instructions {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}
.rlc-oauth-instructions ol {
    margin-left: 20px;
}
.rlc-oauth-active-providers {
    margin-top: 15px;
    font-size: 14px;
}

/* Webhook status indicator */
.webhook-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
}
.webhook-status.active {
    background-color: #4CAF50;
}
.webhook-status.inactive {
    background-color: #ccc;
}

/* Loading states */
.rlc-loading {
    opacity: 0.6;
    pointer-events: none;
}
.rlc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: rlc-spin 1s linear infinite;
    margin-left: 5px;
}
@keyframes rlc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Admin tabs */
.nav-tab-wrapper {
    margin-bottom: 20px;
}

.form-table h4 {
    margin: 20px 0 10px;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
}

.form-table code {
    background: #f0f0f0;
    padding: 2px 5px;
    font-family: monospace;
}

.large-text {
    width: 100%;
    max-width: 600px;
}

#api-keys-list input[type="text"] {
    width: 90%;
}

.wp-list-table .column-actions {
    width: 100px;
}

.rlc-auth-site-list {
    --rlc-primary: #026f52;
    --rlc-secondary: #3FAE2A;
    --rlc-border: #e6e7eb;
    --rlc-text-muted: #6b7280;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.rlc-auth-entry {
    display: flex;
    flex-direction: column;
}

.rlc-auth-settings {
    --rlc-primary: #026f52;
    --rlc-secondary: #3FAE2A;
}

.rlc-auth-site-card {
    display: grid;
    grid-template-columns: 1fr 44px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--rlc-border);
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 6px 18px rgba(2, 111, 82, 0.08), 0 2px 6px rgba(0,0,0,0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.rlc-auth-site-card:hover {
    border-color: color-mix(in srgb, var(--rlc-primary) 30%, var(--rlc-border));
    box-shadow: 0 5px 10px rgba(63, 174, 42, 0.18), 0 4px 10px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.rlc-auth-site-card .rlc-site-main {
    min-width: 0;
}

.rlc-auth-site-card .rlc-site-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.rlc-auth-site-card .rlc-site-url {
    color: var(--rlc-text-muted);
    font-size: 12px;
    margin-top: 2px;
}

.rlc-auth-site-card .rlc-site-meta {
    display: inline-flex;
    gap: 6px;
    margin-top: 8px;
}

.rlc-auth-site-card .rlc-site-toggle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    box-sizing: border-box;
    padding: 0;
    border: 1px solid var(--rlc-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rlc-primary);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rlc-auth-site-card .rlc-site-toggle:hover {
    background: rgba(2, 111, 82, 0.08);
    border-color: var(--rlc-primary);
}

.rlc-auth-site-card .rlc-site-actions {
    display: flex;
    justify-content: flex-end;
}

.rlc-auth-site-card .rlc-site-toggle.is-open .dashicons {
    transform: rotate(180deg);
}

.rlc-auth-site-card .rlc-site-toggle .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 18px;
    transition: transform 0.2s ease;
}

.rlc-auth-entry-panel {
    background: #fff;
    border: 1px solid var(--rlc-border);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    padding: 12px 14px 14px;
    display: block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    margin-top: 4px;
}

.rlc-auth-entry-panel[hidden] {
    display: none !important;
}

.rlc-auth-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.rlc-auth-grid { 
    border: 1px solid #d7dbe0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.rlc-auth-grid-head,
.rlc-auth-grid-row {
    display: flex;
    gap: 16px;
}

.rlc-auth-grid-head {
    padding: 10px 14px;
    background: #f7f8fa;
    border-bottom: 1px solid #e3e6ea;
}

.rlc-auth-grid-head > div {
    flex: 1 1 0;
    min-width: 0;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 600;
    color: #475467;
}

.rlc-auth-grid-row > .rlc-auth-cell {
    flex: 1 1 0;
    min-width: 0;
}

.rlc-auth-grid-row {
    padding: 14px;
    align-items: start;
    background: #fff;
}

.rlc-auth-cell-urls .display-url {
    display: block;
    line-height: 1.45;
    margin-bottom: 4px;
    color: #111827;
    word-break: break-word;
}

.rlc-auth-cell-token .display-auth-token {
    display: inline-block;
    box-sizing: border-box;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.45;
    white-space: normal;
    word-break: break-all;
    color: #1f2937;
}

.rlc-auth-cell-actions {
    justify-self: end;
}

.rlc-auth-cell-actions .rlc-auth-actions {
    justify-content: flex-start;
}

.rlc-auth-cell-urls .edit-urls {
    padding-bottom: 34px;
}

.rlc-auth-cell-urls .edit-urls .edit-url {
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
}

.rlc-auth-cell-urls .add-edit-url.button {
    right: 0;
    bottom: 0;
}

@media (max-width: 1080px) {
    .rlc-auth-grid-head {
        display: none;
    }

    .rlc-auth-grid-row {
        display: block;
    }

    .rlc-auth-grid-row > .rlc-auth-cell + .rlc-auth-cell {
        margin-top: 12px;
    }

    .rlc-auth-cell-actions {
        justify-self: start;
    }

    .rlc-auth-cell-actions .rlc-auth-actions {
        justify-content: flex-start;
    }
}
