/* ========================================================================
   Royal Backup & Reset - Modern Admin Styles
   ======================================================================== */

/* ========================================================================
   Base Layout & Typography
   ======================================================================== */

.royalbr-wrap {
    background: #f5f5f7;
    padding: 15px 15px 30px;
    min-height: calc(100vh - 32px);
}

.royalbr-main-title {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 20px 0;
    padding: 0;
    line-height: 1.2;
}

.royalbr-description {
    font-size: 14px;
    line-height: 1.5;
    color: #6e6e73;
    margin: 10px 0 18px;
}

.royalbr-description code {
    background: #f0f0f2;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 13px;
    color: #1d1d1f;
}

/* ========================================================================
   Tab Navigation
   ======================================================================== */

.royalbr-tabs-wrapper {
    margin-top: 0;
}

.royalbr-nav-tabs {
    display: flex;
    gap: 0;
    background: transparent;
    border-bottom: 1px solid #d2d2d7;
    margin-bottom: 20px;
    padding: 0;
}

.royalbr-nav-tab {
    position: relative;
    padding: 12px 5px;
    margin-right: 30px;
    font-size: 15px;
    font-weight: 500;
    color: #6e6e73;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    outline: none;
}

.royalbr-nav-tab:hover {
    color: #1d1d1f;
    background: transparent;
}

.royalbr-nav-tab:focus {
    outline: none;
    box-shadow: none;
}

.royalbr-nav-tab.royalbr-nav-tab-active {
    color: #4f5bd5;
    border-bottom-color: #4f5bd5;
    background: transparent;
}

/* ========================================================================
   Tab Content
   ======================================================================== */

.royalbr-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.royalbr-tab-content.royalbr-tab-active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================================
   Cards
   ======================================================================== */

.royalbr-card {
    background: #ffffff;
    border: 1px solid #d2d2d7;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.royalbr-card h2 {
    margin: 0 0 10px 0;
    color: #1d1d1f;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.royalbr-card h3 {
    margin: 0 0 12px 0;
    color: #1d1d1f;
    font-size: 16px;
    font-weight: 600;
}

/* ========================================================================
   Checkbox Cards (Modern Bordered Checkboxes)
   ======================================================================== */

.royalbr-backup-options,
.royalbr-reset-options {
    margin: 18px 0;
}

.royalbr-reset-options {
}

.royalbr-reset-options h3 {
    margin-top: 0;
    margin-bottom: 6px;
    color: #1d1d1f;
    font-size: 16px;
    font-weight: 600;
}

.royalbr-reset-options > .royalbr-description {
    margin-bottom: 15px;
}

.royalbr-checkbox-card {
    position: relative;
    margin-bottom: 12px;
}

.royalbr-checkbox-card:last-child {
    margin-bottom: 0;
}

.royalbr-checkbox-card label {
    display: flex;
    align-items: flex-start;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    margin: 0;
}

/* ========================================================================
   Custom Checkbox - Unified Style
   ======================================================================== */

.royalbr-custom-checkbox {
    position: relative;
    width: 18px !important;
    height: 19px !important;
    flex-shrink: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid #d2d2d7;
    border-radius: 4px;
    transition: all 0.2s ease;
    outline: none;
}

.royalbr-custom-checkbox:hover {
    border-color: #4f5bd5;
}

.royalbr-custom-checkbox:checked {
    background: #4f5bd5;
    border-color: #4f5bd5;
}

.royalbr-custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 4px;
    width: 3px;
    height: 6px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.royalbr-custom-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.royalbr-custom-checkbox:focus {
    outline: none;
    border-color: #d2d2d7;
    box-shadow: none;
}

/* Margin variations for different contexts */
.royalbr-checkbox-card .royalbr-custom-checkbox {
    margin: 2px 10px 0 0;
}

#settings .form-table .royalbr-custom-checkbox {
    margin: 0 10px 0 0;
}

.royalbr-restore-item .royalbr-custom-checkbox {
    margin: 2px 10px 0 0;
}

.royalbr-checkbox-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.royalbr-checkbox-title {
    font-size: 14px;
    font-weight: 400;
    color: #1d1d1f;
    line-height: 1.4;
}

.royalbr-checkbox-title strong {
    font-weight: 500;
}

.royalbr-checkbox-label {
    font-size: 12px;
    color: #86868b;
    line-height: 1.3;
}

/* Warning Checkbox Style */
.royalbr-checkbox-warning .royalbr-custom-checkbox:checked {
    background: #ff9500;
    border-color: #ff9500;
}

/* ========================================================================
   Buttons
   ======================================================================== */

.royalbr-button-primary,
.royalbr-button-secondary,
.royalbr-button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
    outline: none;
}

.royalbr-button-primary {
    background: #4f5bd5;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 91, 213, 0.3);
}

.royalbr-button-primary:hover:not(:disabled) {
    background: #3d47a8;
    box-shadow: 0 4px 12px rgba(79, 91, 213, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
}

.royalbr-button-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(79, 91, 213, 0.3);
}

.royalbr-button-primary:focus {
    outline: none;
}

.royalbr-button-primary:disabled {
    background: #d2d2d7;
    color: #86868b;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.royalbr-button-secondary {
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    box-shadow: none;
}

.royalbr-button-secondary:hover:not(:disabled) {
    background: #e5e5e7;
    border-color: #86868b;
    color: #1d1d1f;
}

.royalbr-button-secondary:active:not(:disabled) {
    background: #d2d2d7;
}

.royalbr-button-secondary:focus {
    outline: none;
}

.royalbr-button-secondary:disabled {
    background: #f5f5f7;
    color: #86868b;
    cursor: not-allowed;
    opacity: 0.5;
}

.royalbr-button-danger {
    background: #d63638;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(214, 54, 56, 0.3);
}

.royalbr-button-danger:hover:not(:disabled) {
    background: #b32d2e;
    box-shadow: 0 4px 12px rgba(214, 54, 56, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
}

.royalbr-button-danger:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(214, 54, 56, 0.3);
}

.royalbr-button-danger:focus {
    outline: none;
}

.royalbr-button-danger:disabled {
    background: #d2d2d7;
    color: #86868b;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}



/* Button Actions Container */
.royalbr-backup-actions,
.royalbr-reset-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e7;
}

/* ========================================================================
   Confirmation Section
   ======================================================================== */

.royalbr-reset-confirmation {
}

.royalbr-reset-confirmation h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #1d1d1f;
    font-size: 16px;
    font-weight: 600;
}

.royalbr-checkbox-warning input[type="checkbox"]:checked:before {
    visibility: hidden;
}

/* ========================================================================
   Progress Indicators
   ======================================================================== */

.royalbr-progress-wrapper {
    margin-top: 18px;
    padding: 18px;
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    border-radius: 7px;
}

.royalbr-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e5e7;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.royalbr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f5bd5, #7b85e8);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

#reset-database .royalbr-progress-fill {
    background: linear-gradient(90deg, #ff9500, #ffa926);
}

.royalbr-progress-text {
    font-size: 14px;
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 500;
}

.royalbr-progress-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
}

.royalbr-progress-actions .royalbr-button-primary,
.royalbr-progress-actions .royalbr-button-secondary {
    padding: 8px 16px;
    font-size: 13px;
}

/* ========================================================================
   Notices
   ======================================================================== */

.royalbr-notice {
    padding: 12px 16px;
    border-radius: 7px;
    margin: 15px 0;
    border-left: 4px solid;
}

.royalbr-notice-warning {
    background: #fff9f0;
    border-left-color: #ff9500;
    color: #1d1d1f;
}

.royalbr-notice-success {
    background: #f0fdf4;
    border-left-color: #00a32a;
    color: #1d1d1f;
}

.royalbr-notice-error {
    background: #fef2f2;
    border-left-color: #d63638;
    color: #1d1d1f;
}

.royalbr-notice strong {
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
}

/* ========================================================================
   Backup Table
   ======================================================================== */

.royalbr-backup-table {
    margin-top: 15px;
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #e5e5e7;
    border-radius: 4px;
    overflow: hidden;
}

.royalbr-backup-table th,
.royalbr-backup-table td {
    padding: 20px 14px;
    text-align: left;
    border-bottom: 1px solid #e5e5e7;
    vertical-align: top;
}

.royalbr-backup-table th {
    background: #fafafa;
    font-weight: 600;
    font-size: 13px;
    color: #1d1d1f;
    border-top: none;
}

.royalbr-backup-table td {
    font-size: 13px;
    color: #1d1d1f;
    background: #ffffff;
}

.royalbr-backup-table tbody tr {
    transition: background-color 0.15s ease;
}

.royalbr-backup-table tbody tr:hover td {
    background: #f9f9f9;
}

.royalbr-backup-table tbody tr:last-child td {
    border-bottom: none;
}

/* Download Components Styling */
.royalbr-backup-components {
    max-width: 400px;
}

.royalbr-download-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 2px;
    font-size: 13px;
}

.royalbr-download-label .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.royalbr-download-links {
    display: inline;
    line-height: 1.6;
}

.royalbr-download-component {
    display: inline;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    color: #4f5bd5;
    font-size: 12px;
    text-decoration: underline;
    transition: color 0.15s ease;
    outline: none;
}

.royalbr-download-component:hover {
    color: #3d47a8;
}

.royalbr-download-component:focus {
    outline: none;
}

.royalbr-download-component:not(:last-child)::after {
    content: ', ';
}

/* Action Buttons */
.royalbr-backup-actions {
    white-space: nowrap;
}

.royalbr-backup-actions .button {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 4px;
    outline: none;
    margin: 0;
    vertical-align: middle;
    font-weight: 500;
    border: none;
    transition: all 0.15s ease;
}

.royalbr-backup-actions .button-primary {
    margin-right: 8px;
    background: #4f5bd5;
    color: #ffffff;
}

.royalbr-backup-actions .button-primary:hover {
    background: #3d47a8;
}

.royalbr-backup-actions .button:not(.button-primary) {
    background: #f5f5f7;
    color: #1d1d1f;
}

.royalbr-backup-actions .button:not(.button-primary):hover {
    background: #e5e5e7;
    color: #1d1d1f;
}

.royalbr-no-backups {
    text-align: center;
    padding: 40px 20px;
    background: #fafafa;
    border: 2px dashed #d2d2d7;
    border-radius: 4px;
    margin-top: 15px;
}

.royalbr-no-backups p {
    font-size: 15px;
    color: #6e6e73;
    margin: 0;
}

/* ========================================================================
   Settings Form
   ======================================================================== */

#settings .form-table {
    margin-top: 18px;
}

#settings .form-table th {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 14px;
}

#settings .form-table td {
    color: #1d1d1f;
    font-size: 14px;
}

#settings .form-table .description {
    color: #6e6e73;
    font-size: 13px;
}

#settings h3 {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e5e5e7;
}

#settings h3:first-of-type {
    margin-top: 18px;
    padding-top: 0;
    border-top: none;
}

/* Custom Checkboxes in Settings Tab */
#settings .form-table label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
}

#settings .form-table fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

#settings .form-table fieldset label {
    margin-bottom: 10px;
}

#settings .form-table fieldset label:last-child {
    margin-bottom: 0;
}

/* ========================================================================
   Modal Dialogs
   ======================================================================== */

.royalbr-modal {
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.royalbr-modal-content {
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.royalbr-modal-content.royalbr-modal-large {
    max-width: 700px;
}

.royalbr-modal-header {
    padding: 20px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.royalbr-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1d1d1f;
    font-weight: 600;
}

.royalbr-modal-close {
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    color: #86868b;
    line-height: 1;
    transition: color 0.2s ease;
}

.royalbr-modal-close:hover {
    color: #d63638;
}

.royalbr-modal-body {
    padding: 16px 20px;
}

.royalbr-modal-footer {
    padding: 0 20px 20px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.royalbr-modal-footer .button {
    margin: 0;
    padding: 2px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    outline: none;
}

.royalbr-modal-footer .button-primary {
    background: #4f5bd5;
    border-color: #4f5bd5;
    color: #ffffff;
}

.royalbr-modal-footer .button-primary:hover {
    background: #3d47a8;
    border-color: #3d47a8;
}

.royalbr-modal-footer .button:not(.button-primary) {
    background: transparent;
    border: 1px solid #d2d2d7;
    color: #1d1d1f;
}

.royalbr-modal-footer .button:not(.button-primary):hover {
    border-color: #86868b;
    color: #1d1d1f;
}

/* Restore Modal Specific */
.royalbr-restore-components {
    border: none;
    padding: 0;
    margin: 0;
}

.royalbr-restore-item {
    position: relative;
    margin-bottom: 12px;
}

.royalbr-restore-item:last-child {
    margin-bottom: 0;
}

.royalbr-restore-item label {
    display: flex;
    align-items: flex-start;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    margin: 0;
}


.royalbr-restore-item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.royalbr-restore-item strong {
    display: block;
    color: #1d1d1f;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
}

.royalbr-restore-item .description {
    display: block;
    color: #86868b;
    font-size: 12px;
    margin-top: 0;
    line-height: 1.3;
}

/* Select All Item */
.royalbr-restore-select-all {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e7;
}

.royalbr-restore-select-all label {
    align-items: center;
}

.royalbr-restore-select-all strong {
    font-weight: 600;
    font-size: 14px;
}

/* ========================================================================
   Admin Notices
   ======================================================================== */

#royalbr-admin-notices {
    margin-top: 16px;
}

#royalbr-admin-notices .notice {
    margin: 12px 0;
    border-radius: 4px;
}

/* ========================================================================
   Loading States
   ======================================================================== */

.royalbr-loading {
    opacity: 0.6;
    pointer-events: none;
}

.royalbr-loading .button {
    position: relative;
}

.royalbr-loading .button:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 1px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================================================
   Admin Bar Icons & Tooltips
   ======================================================================== */

#wpadminbar #wp-admin-bar-royalbr_backup_node,
#wpadminbar #wp-admin-bar-royalbr_restore_node,
#wpadminbar #wp-admin-bar-royalbr_reset_node {
    margin-right: 0 !important;
}

#wpadminbar #wp-admin-bar-royalbr_backup_node > .ab-item::after,
#wpadminbar #wp-admin-bar-royalbr_restore_node > .ab-item::after,
#wpadminbar #wp-admin-bar-royalbr_reset_node > .ab-item::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: #1d2327;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#wpadminbar #wp-admin-bar-royalbr_backup_node:hover > .ab-item::after,
#wpadminbar #wp-admin-bar-royalbr_restore_node:hover > .ab-item::after,
#wpadminbar #wp-admin-bar-royalbr_reset_node:hover > .ab-item::after {
    opacity: 1;
}

#wpadminbar .royalbr-backup-running .ab-icon {
    opacity: 0.5;
    cursor: wait;
}

#wpadminbar .royalbr-backup-running .ab-icon::before {
    animation: royalbr-spin 1s linear infinite;
}

@keyframes royalbr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================================================
   Backup Completion Notice
   ======================================================================== */

.royalbr-backup-complete-notice {
    position: relative;
    border-left-width: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.royalbr-backup-complete-notice p {
    margin: 0.5em 0;
    line-height: 1.6;
}

.royalbr-backup-complete-notice strong {
    font-size: 14px;
}

/* Delete Old Directories Notice */
.delete-old-directories {
    padding: 18px;
    background: #fff9f0;
    border-left: 4px solid #ff9500;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

#royalbr_delete_old_dirs_pagediv {
    padding-bottom: 12px;
}

.delete-old-directories p {
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.6;
}

.delete-old-directories form {
    margin-top: 16px;
}

.delete-old-directories .button-primary {
    background: #d63638;
    border-color: #d63638;
    box-shadow: 0 1px 0 #b32d2e;
    text-shadow: none;
    border-radius: 4px;
}

.delete-old-directories .button-primary:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

/* ========================================================================
   AJAX Restore Screen Styles
   ======================================================================== */

@keyframes royalbr_rotate {
    from { transform: rotate(0); }
    to { transform: rotate(360deg); }
}

.royalbr-restore-container {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    padding-top: 30px;
    background: #f5f5f7;
    overflow: auto;
}

.royalbr-restore-container h2 {
    margin: 0;
}

.royalbr-restore-main {
    max-width: 600px;
    margin: 0 auto;
    margin-top: 20px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

.royalbr-restore-main--header {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    padding: 30px 30px 20px;
    line-height: 1.3;
    box-sizing: border-box;
    border-bottom: 1px solid #e5e5e7;
}

.royalbr-restore-main--components {
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
    min-height: 320px;
}

.royalbr-restore-main--components > p {
    text-align: center;
    color: #6e6e73;
    margin-bottom: 25px;
}

.royalbr-restore-main--components > h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 20px 0;
    text-align: center;
}

ul.royalbr-restore-components-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.royalbr-restore-components-list li {
    color: #86868b;
    font-size: 1.1em;
    margin-bottom: 1.2em;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

ul.royalbr-restore-components-list li::after {
    content: '\f469';
    font-family: dashicons;
    font-size: 20px;
    display: inline-block;
    margin-left: 10px;
    flex-shrink: 0;
}

ul.royalbr-restore-components-list li .royalbr-component--wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

ul.royalbr-restore-components-list li .royalbr-component--description {
    font-size: 1em;
    font-weight: 500;
    color: inherit;
}

ul.royalbr-restore-components-list li .royalbr-component--helper {
    font-size: 0.82em;
    font-weight: 400;
    color: #86868b;
    line-height: 1.3;
}

ul.royalbr-restore-components-list li.active .royalbr-component--helper {
    color: #6e6e73;
}

ul.royalbr-restore-components-list li.done .royalbr-component--helper {
    color: #86868b;
}

ul.royalbr-restore-components-list li.done {
    color: #00a32a;
}

ul.royalbr-restore-components-list li.done::after {
    content: "\f147";
}

ul.royalbr-restore-components-list li.active {
    color: #1d1d1f;
}

ul.royalbr-restore-components-list li.active::after {
    content: "\f463";
    animation: royalbr_rotate 1s linear infinite;
}

ul.royalbr-restore-components-list li.error {
    color: #d63638;
}

ul.royalbr-restore-components-list li.error::after {
    content: "\f335";
}

.royalbr-restore-result {
    padding: 12px 0;
    display: none;
    font-size: 1.2em;
    font-weight: 600;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.royalbr-restore-result.restore-success {
    color: #00a32a;
    text-align: center;
}

.royalbr-restore-result.restore-error {
    color: #d63638;
}

.royalbr-restore-result .dashicons {
    font-size: 1.5em;
    order: 2;
}

.royalbr-restore-result .royalbr-restore-result--text {
    order: 1;
}

.royalbr-component--progress {
    font-size: 0.85em;
    color: #6e6e73;
    font-weight: normal;
}

/* Restore Completion Section */
.royalbr-restore-completion {
    margin-top: 30px;
}

.royalbr-restore-error-message {
    background: #fef2f2;
    border-left: 4px solid #d63638;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #1d1d1f;
    font-size: 14px;
    line-height: 1.5;
}

.royalbr-restore-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.royalbr-restore-buttons .button {
    padding: 2px 17px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.royalbr-restore-buttons .button-primary {
    background: #4f5bd5;
    border-color: #4f5bd5;
    color: #ffffff;
}

.royalbr-restore-buttons .button-primary:hover {
    background: #3d47a8;
    border-color: #3d47a8;
    color: #ffffff;
}

.royalbr-restore-buttons .button:not(.button-primary) {
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    color: #1d1d1f;
}

.royalbr-restore-buttons .button:not(.button-primary):hover {
    background: #e5e5e7;
    border-color: #86868b;
}

/* ========================================================================
   Responsive Design
   ======================================================================== */

@media (max-width: 1024px) {
    .royalbr-wrap {
        padding: 15px 20px 30px;
    }
}

@media (max-width: 782px) {
    .royalbr-wrap {
        margin: 0 -10px;
        padding: 12px 15px 25px;
    }

    .royalbr-main-title {
        font-size: 24px;
    }

    .royalbr-nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .royalbr-nav-tab {
        padding: 10px 16px;
        font-size: 14px;
    }

    .royalbr-card {
        padding: 18px;
        border-radius: 6px;
    }

    .royalbr-card h2 {
        font-size: 18px;
    }

    .royalbr-checkbox-card label {
        padding: 10px 12px;
    }

    .royalbr-button-primary,
    .royalbr-button-danger {
        width: 100%;
        padding: 10px 18px;
    }

    .royalbr-backup-table th,
    .royalbr-backup-table td {
        padding: 8px;
        font-size: 12px;
    }

    .royalbr-backup-actions .button {
        font-size: 12px;
        padding: 5px 10px;
        display: block;
        width: 100%;
        margin-bottom: 4px !important;
    }

    .royalbr-backup-actions .button-primary {
        margin-right: 0 !important;
    }

    .royalbr-download-component {
        font-size: 11px;
    }

    .royalbr-modal-content {
        width: 95%;
        margin: 20px;
    }

    .royalbr-restore-main {
        max-width: 100%;
        margin: 10px;
    }

    .royalbr-restore-main--components {
        padding: 20px;
    }

    .royalbr-restore-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .royalbr-restore-buttons .button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .royalbr-main-title {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .royalbr-nav-tab {
        font-size: 13px;
        padding: 10px 14px;
    }

    .royalbr-checkbox-title {
        font-size: 14px;
    }

    .royalbr-checkbox-label {
        font-size: 12px;
    }
}
