/* Auto-Backup & One-Click Restore*/

/* Status and message classes */
.abr-status-success {
    color: var(--abr-success) !important;
}

.abr-status-error {
    color: var(--abr-danger) !important;
}

.abr-success-message {
    color: var(--abr-success) !important;
    font-weight: bold;
}

.abr-error-message {
    color: var(--abr-danger) !important;
    font-weight: bold;
}

.abr-info-message {
    color: var(--abr-info) !important;
}

.abr-email-test-result {
    margin-top: 10px;
}

.abr-progress-hidden {
    display: none;
}

:root {
    --abr-primary: #2563eb;
    --abr-secondary: #64748b;
    --abr-success: #059669;
    --abr-warning: #d97706;
    --abr-danger: #dc2626;
    --abr-info: #0ea5e9;
    --abr-dark: #1e293b;
    --abr-light: #f8fafc;
    --abr-border: #e2e8f0;
    --abr-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --abr-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Instructions Panel */
.abr-instructions-panel {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: var(--abr-shadow);
    border: 1px solid var(--abr-border);
}

.abr-instructions-panel h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--abr-dark);
    font-weight: 600;
}

.abr-instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.abr-instruction-item {
    background: var(--abr-light);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid var(--abr-border);
}

.abr-instruction-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--abr-shadow-lg);
    border-color: var(--abr-primary);
}

.abr-instruction-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.abr-instruction-item h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--abr-dark);
}

.abr-instruction-item p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

/* Plugin Header */
.wrap h1.wp-heading-inline {
    background: var(--abr-primary);
    color: white;
    padding: 16px 24px;
    border-radius: 6px;
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 600;
    box-shadow: var(--abr-shadow);
}

.wrap h1.wp-heading-inline::before {
    content: "🛡️";
    margin-right: 12px;
    font-size: 24px;
}

.wrap h1.wp-heading-inline::after {
    content: "by Dcastalia Ltd.";
    position: absolute;
    bottom: 4px;
    right: 16px;
    font-size: 11px;
    opacity: 0.8;
    font-weight: 400;
}

/* Statistics Cards */
.abr-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.abr-stat-box {
    background: white;
    border: 1px solid var(--abr-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--abr-shadow);
    transition: all 0.2s ease;
}

.abr-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--abr-shadow-lg);
}

.abr-stat-box.updated {
    animation: stat-update 0.4s ease;
}

@keyframes stat-update {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.abr-stat-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--abr-primary);
}

.abr-stat-box h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--abr-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.abr-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--abr-primary);
    display: block;
    line-height: 1;
    transition: all 0.2s ease;
}

.abr-stat-number.loading {
    opacity: 0.5;
    animation: pulse-loading 1.5s infinite;
}

@keyframes pulse-loading {
    0%,
    100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* Safety Notice */
.abr-safety-notice {
    background: #fef3cd;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 16px;
    margin: 24px 0;
    border-left: 4px solid var(--abr-warning);
}

.abr-safety-notice h4 {
    margin: 0 0 12px 0;
    color: #92400e;
    font-size: 14px;
    font-weight: 600;
}

.abr-safety-notice ul {
    margin: 0;
    padding-left: 16px;
}

.abr-safety-notice li {
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: #92400e;
}

.abr-safety-notice li strong {
    color: #78350f;
}

/* Action Panel */
.abr-actions {
    background: white;
    margin: 24px 0;
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--abr-shadow);
    border: 1px solid var(--abr-border);
}

.abr-actions .button-primary {
    background: var(--abr-primary);
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: var(--abr-shadow);
    transition: all 0.2s ease;
}

.abr-actions .button-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: var(--abr-shadow-lg);
}

/* Settings page specific styling */
.abr-settings-container {
    max-width: 1000px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--abr-shadow);
    padding: 24px;
    margin-top: 20px;
    border: 1px solid var(--abr-border);
}

.abr-settings-container .form-table {
    background: transparent;
    border: none;
}

.abr-settings-container .form-table th {
    width: 250px;
    background: var(--abr-light);
    padding: 16px;
    border-radius: 6px 0 0 6px;
    border-bottom: 1px solid var(--abr-border);
    font-weight: 600;
    color: var(--abr-dark);
    vertical-align: top;
}

.abr-settings-container .form-table td {
    padding: 16px;
    background: white;
    border-radius: 0 6px 6px 0;
    border-bottom: 1px solid var(--abr-border);
    border-left: 1px solid var(--abr-border);
}

.abr-settings-container .form-table tr {
    margin-bottom: 8px;
}

.abr-settings-container .form-table tr:last-child th,
.abr-settings-container .form-table tr:last-child td {
    border-bottom: none;
}

.abr-settings-container input[type="text"],
.abr-settings-container input[type="email"],
.abr-settings-container input[type="number"],
.abr-settings-container select {
    border: 1px solid var(--abr-border);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.abr-settings-container input[type="text"]:focus,
.abr-settings-container input[type="email"]:focus,
.abr-settings-container input[type="number"]:focus,
.abr-settings-container select:focus {
    border-color: var(--abr-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.abr-settings-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: var(--abr-primary);
}

.abr-settings-container label {
    font-weight: 500;
    color: var(--abr-dark);
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.abr-settings-container .description {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 6px;
}

.abr-settings-container fieldset {
    border: 1px solid var(--abr-border);
    border-radius: 4px;
    padding: 12px;
    background: var(--abr-light);
}

.abr-settings-container fieldset label {
    margin-bottom: 8px;
}

.email-settings-row {
    transition: opacity 0.2s ease;
}

.abr-settings-container .button-primary {
    background: var(--abr-primary);
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    color: white;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.abr-settings-container .button-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: var(--abr-shadow-lg);
}

.abr-actions .button-secondary {
    background: white;
    border: 1px solid var(--abr-border);
    color: var(--abr-dark);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.abr-actions .button-secondary:hover {
    border-color: var(--abr-primary);
    color: var(--abr-primary);
    transform: translateY(-1px);
}

/* Progress Bar */
.abr-progress {
    display: none;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--abr-shadow);
    border: 1px solid var(--abr-border);
    position: relative;
}

.abr-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--abr-dark);
}

.abr-progress-message {
    font-weight: 600;
    color: var(--abr-dark);
    display: flex;
    align-items: center;
}

.abr-progress-message::before {
    content: "⚡";
    margin-right: 8px;
    font-size: 16px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.abr-progress-percent {
    font-weight: 600;
    color: var(--abr-primary);
    font-size: 16px;
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.abr-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--abr-light);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--abr-border);
}

.abr-progress-fill {
    height: 100%;
    background: var(--abr-primary);
    width: 0%;
    transition: width 0.6s ease;
    position: relative;
    border-radius: 4px;
}

/* Progress States */
.abr-progress.processing .abr-progress-fill {
    background: var(--abr-primary);
}

.abr-progress.success .abr-progress-fill {
    background: var(--abr-success);
}

.abr-progress.error .abr-progress-fill {
    background: var(--abr-danger);
}

/* Table Design */
.wp-list-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--abr-shadow);
    border: 1px solid var(--abr-border);
}

.wp-list-table thead th {
    background: var(--abr-primary);
    color: white !important;
    font-weight: 600;
    padding: 16px;
    border: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wp-list-table tbody tr {
    border-bottom: 1px solid var(--abr-border);
    transition: background-color 0.2s ease;
}

.wp-list-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

.wp-list-table tbody td {
    padding: 16px;
    vertical-align: middle;
    border: none;
    font-size: 13px;
}

.wp-list-table tbody td strong {
    color: var(--abr-dark);
    font-weight: 600;
}

/* Buttons */
.abr-restore-btn {
    background: var(--abr-success) !important;
    border: none !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    transition: all 0.2s ease !important;
    margin-right: 8px !important;
}

.abr-restore-btn:hover {
    background: #047857 !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--abr-shadow) !important;
}

.abr-restore-btn::before {
    content: "↻";
    margin-right: 4px;
    font-size: 12px;
}

.abr-delete-btn {
    background: transparent !important;
    border: 1px solid var(--abr-danger) !important;
    color: var(--abr-danger) !important;
    padding: 7px 14px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    transition: all 0.2s ease !important;
}

.abr-delete-btn:hover {
    background: var(--abr-danger) !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

.abr-delete-btn::before {
    content: "🗑️";
    margin-right: 4px;
}

.abr-delete-btn:disabled,
.abr-restore-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Modal Styles */
.abr-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.abr-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--abr-shadow-lg);
    animation: modalSlideIn 0.2s ease-out;
    overflow: hidden;
    border: 1px solid var(--abr-border);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.abr-modal-header {
    background: var(--abr-primary);
    color: white;
    padding: 20px 24px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.abr-modal-header::before {
    margin-right: 12px;
    font-size: 20px;
}

.abr-modal-header.warning::before {
    content: "⚠️";
}

.abr-modal-header.success::before {
    content: "✅";
}

.abr-modal-header.error::before {
    content: "❌";
}

.abr-modal-body {
    padding: 24px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--abr-dark);
}

.abr-modal-footer {
    padding: 16px 24px 24px;
    text-align: right;
    border-top: 1px solid var(--abr-border);
}

.abr-modal-footer .button {
    margin-left: 8px;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.abr-modal-footer .button-primary {
    background: var(--abr-primary);
    color: white;
}

.abr-modal-footer .button-secondary {
    background: var(--abr-light);
    color: var(--abr-dark);
    border: 1px solid var(--abr-border);
}

.abr-modal-footer .button:hover {
    transform: translateY(-1px);
}

/* Refresh Animation */
.abr-refresh-btn .dashicons-update.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* No Backups Message */
.no-backups-message {
    text-align: center;
    padding: 40px 20px !important;
    color: #64748b;
    font-style: italic;
    font-size: 14px;
}

.no-backups-message::before {
    content: "📁";
    display: block;
    font-size: 32px;
    margin-bottom: 16px;
}

/* Custom Notices */
.notice.abr-notice {
    border-left: 4px solid var(--abr-primary);
    background: white;
    border-radius: 4px;
    box-shadow: var(--abr-shadow);
    margin: 16px 0;
}

.notice.abr-notice.notice-success {
    border-left-color: var(--abr-success);
}

.notice.abr-notice.notice-error {
    border-left-color: var(--abr-danger);
}

/* Responsive Design */
@media (max-width: 768px) {
    .abr-stats {
        grid-template-columns: 1fr;
    }

    .abr-instructions-grid {
        grid-template-columns: 1fr;
    }

    .wrap h1.wp-heading-inline {
        font-size: 20px;
        padding: 12px 16px;
    }

    .wrap h1.wp-heading-inline::after {
        display: none;
    }

    .abr-actions {
        padding: 16px;
        text-align: center;
    }

    .abr-actions .button {
        display: block;
        margin: 8px 0;
        width: 100%;
    }

    .abr-instructions-panel {
        padding: 16px;
    }

    .abr-safety-notice {
        padding: 12px;
    }

    .abr-modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .wp-list-table {
        font-size: 12px;
    }

    .wp-list-table td {
        padding: 12px 8px;
    }

    .abr-restore-btn,
    .abr-delete-btn {
        padding: 6px 12px !important;
        font-size: 11px !important;
        margin: 2px !important;
        display: block !important;
        width: 100% !important;
    }
}

/* Brand Footer */
.abr-brand-footer {
    text-align: center;
    padding: 24px;
    margin-top: 32px;
    background: var(--abr-light);
    border-radius: 8px;
    border: 1px solid var(--abr-border);
}

.abr-brand-footer::before {
    content: "🛡️ Auto-Backup & One-Click Restore";
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--abr-primary);
    margin-bottom: 8px;
}

.abr-brand-footer::after {
    content: "Developed by Dcastalia Ltd.";
    display: block;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

/* System Information Box */
.abr-info-box {
    margin-top: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--abr-shadow);
    padding: 24px;
    border-left: 4px solid var(--abr-success);
    border: 1px solid var(--abr-border);
}

.abr-info-box h3 {
    margin: 0 0 16px 0;
    color: var(--abr-dark);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.abr-info-box h3::before {
    content: "🔧";
    margin-right: 8px;
    font-size: 20px;
}

.abr-info-box table {
    margin-top: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.abr-info-box table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--abr-border);
    background: var(--abr-light);
    font-size: 13px;
}

.abr-info-box table td:first-child {
    width: 250px;
    font-weight: 600;
    color: var(--abr-dark);
    background: white;
    border-right: 1px solid var(--abr-border);
    border-radius: 4px 0 0 4px;
}

.abr-info-box table td:last-child {
    border-radius: 0 4px 4px 0;
}

.abr-info-box table tr:last-child td {
    border-bottom: none;
}

/* Email Template Styles */
.abr-email-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f7fafc;
}

.abr-email-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.abr-email-header {
    background: #2563eb;
    color: white;
    padding: 30px;
    text-align: center;
}

.abr-email-header h1 {
    margin: 0;
    font-size: 24px;
}

.abr-email-content {
    padding: 30px;
}

.abr-test-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.abr-email-details {
    background: #f8fafc;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #10b981;
    margin: 20px 0;
}

.abr-email-footer {
    background: #f8fafc;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Backup Email Styles */
.abr-backup-email-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #374151;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.abr-backup-email-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.abr-backup-email-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.abr-backup-email-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.abr-backup-email-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    margin: 0 auto 20px;
    display: block;
    background: rgba(255,255,255,0.1);
    padding: 8px;
}

.abr-backup-email-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.abr-backup-email-content {
    padding: 40px 30px;
}

.abr-status-badge {
    display: inline-block;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    margin-bottom: 30px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.abr-status-badge.success {
    background: #10b981;
}

.abr-status-badge.failed {
    background: #ef4444;
}

.abr-backup-email-details {
    background: #f9fafb;
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
}

.abr-backup-email-details.success {
    border-left: 6px solid #10b981;
}

.abr-backup-email-details.failed {
    border-left: 6px solid #ef4444;
}

.abr-backup-email-footer {
    background: #f9fafb;
    padding: 30px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.abr-email-button {
    display: inline-block;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 600;
    transition: transform 0.2s;
}

.abr-email-button:hover {
    transform: translateY(-2px);
}

.abr-site-info {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.abr-site-info p {
    margin: 0;
    font-weight: 600;
    color: #374151;
}

.abr-site-info p:last-child {
    margin: 5px 0 0 0;
    color: #6b7280;
}

.abr-site-info a {
    color: #4f46e5;
}

/* Localhost Email Styles */
.abr-localhost-email-body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 20px;
}

.abr-localhost-email-header {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.abr-localhost-email-header.success {
    background: #e1f5fe;
    border-left: 4px solid #0288d1;
}

.abr-localhost-email-body-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.abr-localhost-notice {
    margin-top: 20px;
    padding: 15px;
    background: #fffbf0;
    border: 1px solid #f0ad4e;
    border-radius: 5px;
}

.abr-localhost-notice strong {
    color: #f0ad4e;
}

.abr-status-success {
    color: green;
}

.abr-status-failure {
    color: red;
}
