/**
 * Prime SEO Tools Page Styles
 *
 * Styles for the Import & Export tools page.
 *
 * @package    Prime_SEO
 * @subpackage Prime_SEO/admin/css
 */

/* Export Grid */
.tools-export-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.tools-export-option {
    display: block;
    cursor: pointer;
}

.tools-export-option input {
    display: none;
}

.tools-export-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s;
}

.tools-export-option input:checked + .tools-export-box {
    background: #eef2ff;
    border-color: #6366f1;
}

.tools-export-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tools-export-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #64748b;
}

.tools-export-option input:checked + .tools-export-box .tools-export-icon {
    background: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tools-export-option input:checked + .tools-export-box .tools-export-icon .dashicons {
    color: #fff;
}

.tools-export-label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.tools-export-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.tools-export-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.tools-export-check .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #fff;
}

.tools-export-option input:checked + .tools-export-box .tools-export-check {
    opacity: 1;
    transform: scale(1);
}

/* File Drop */
.tools-file-drop {
    position: relative;
    margin-bottom: 20px;
}

.tools-file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.tools-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s;
}

.tools-file-drop:hover .tools-file-label,
.tools-file-drop.drag-over .tools-file-label {
    border-color: #6366f1;
    background: #eef2ff;
}

.tools-file-drop.has-file .tools-file-label {
    border-color: #10b981;
    background: #d1fae5;
    border-style: solid;
}

.tools-file-icon {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tools-file-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #6366f1;
}

.tools-file-drop.has-file .tools-file-icon .dashicons {
    color: #10b981;
}

.tools-file-text {
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
}

.tools-file-hint {
    font-size: 13px;
    color: #64748b;
}

.tools-file-name {
    display: none;
    font-size: 15px;
    font-weight: 600;
    color: #059669;
    padding: 8px 16px;
    background: #fff;
    border-radius: 20px;
}

.tools-file-drop.has-file .tools-file-name {
    display: block;
}

.tools-file-drop.has-file .tools-file-text,
.tools-file-drop.has-file .tools-file-hint {
    display: none;
}

/* Notice */
.tools-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: #eef2ff;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #c7d2fe;
}

.tools-notice .dashicons {
    color: #6366f1;
    font-size: 22px;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.tools-notice strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 4px;
}

.tools-notice p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* Buttons */
.tools-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.tools-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.tools-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.tools-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    color: #fff;
}

.tools-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.tools-btn-sm .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.tools-btn-danger {
    background: #fff;
    color: #ef4444;
    border: 1px solid #fecaca;
    padding: 7px 14px;
    box-shadow: none;
}

.tools-btn-danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* Card Footer */
.prime-card-footer {
    padding: 20px 24px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

/* Backups Table */
.tools-backups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tools-backup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.tools-backup-row:hover {
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.tools-backup-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tools-backup-icon {
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.tools-backup-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #6366f1;
}

.tools-backup-meta strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}

.tools-backup-meta span {
    font-size: 12px;
    color: #64748b;
}

.tools-backup-actions {
    display: flex;
    gap: 8px;
}

/* Empty State */
.tools-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
    text-align: center;
}

.tools-empty-icon {
    width: 72px;
    height: 72px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.tools-empty-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #94a3b8;
}

.tools-empty h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px;
}

.tools-empty p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    max-width: 300px;
}

/* Alert */
.tools-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.tools-alert.success {
    background: #d1fae5;
    color: #065f46;
}

.tools-alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.tools-alert .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Export Grid - 3 columns for 6 options */
.tools-export-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Post Meta Badge */
.tools-export-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

/* Progress Modal */
.tools-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100000;
}

.tools-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    padding: 32px 40px;
    width: calc(100% - 40px);
    max-width: 420px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: toolsModalIn 0.3s ease-out;
}

@keyframes toolsModalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.tools-modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.tools-modal-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #6366f1;
}

.tools-modal-icon .dashicons.spin {
    animation: toolsSpin 1s linear infinite;
}

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

.tools-modal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 20px 0;
}

.tools-modal-content p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.tools-progress-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.tools-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.tools-progress-text {
    font-size: 14px;
    color: #64748b;
}

/* Import Mode Selection */
.tools-import-mode {
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.tools-import-mode h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tools-import-mode-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tools-import-mode-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.tools-import-mode-option:hover {
    border-color: #c7d2fe;
}

.tools-import-mode-option:has(input:checked) {
    border-color: #6366f1;
    background: #eef2ff;
}

.tools-import-mode-option input[type="radio"] {
    margin: 3px 0 0 0;
    accent-color: #6366f1;
    flex-shrink: 0;
}

.tools-import-mode-option span {
    flex: 1;
}

.tools-import-mode-option strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.tools-import-mode-option small {
    display: block;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 1024px) {
    .tools-export-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 782px) {
    .tools-export-grid {
        grid-template-columns: 1fr;
    }

    .tools-modal-content {
        margin: 20px;
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .tools-backup-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .tools-backup-actions {
        width: 100%;
    }

    .tools-backup-actions .tools-btn {
        flex: 1;
        justify-content: center;
    }

    .tools-import-mode-options {
        gap: 8px;
    }

    .tools-import-mode-option {
        padding: 12px;
    }
}
