/**
 * Staging Addon Styles
 *
 * @package   Duplicator
 * @copyright (c) 2024, Snap Creek LLC
 */

/* Staging Admin Bar (for staging sites) */
#wpadminbar .dupli-staging-bar {
    background: #ff6b35 !important;
}

#wpadminbar .dupli-staging-bar > .ab-item {
    color: #fff !important;
}

#wpadminbar .dupli-staging-bar:hover > .ab-item {
    background: #e55a2b !important;
    color: #fff !important;
}

#wpadminbar .dupli-staging-bar .ab-icon:before {
    color: #fff !important;
}

#wpadminbar .dupli-staging-bar .ab-icon {
    margin-top: 2px;
}

/* Staging Site Notice */
.dupli-staging-notice {
    border-left-color: #ff6b35;
    padding: 8px 12px 8px 16px;
}

/* Staging Page - Table Styles */
.staging-row.staging-failed {
    background-color: #fcf0f1;
}

.dupli-no-elements {
    text-align: center;
    padding: 40px 20px !important;
    color: #646970;
}

.dupli-versions-column {
    font-size: 12px;
    line-height: 1.6;
    white-space: nowrap;
}

.dupli-versions-column i {
    width: 14px;
    color: #666;
}

.dupli-backup-deleted {
    color: #999;
    font-style: italic;
}

/* Status icon in table */
i.dupli-staging-status-ready {
    color: #46b450;
}

/* Installer Page Styles */
#dupli-staging-status-indicator {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

#dupli-staging-status-indicator .spinner {
    float: none;
    margin: 0;
}

#dupli-staging-status-indicator.dupli-staging-status-creating {
    color: #996800;
}

#dupli-staging-status-indicator.dupli-staging-status-ready {
    color: #00a32a;
}

#dupli-staging-status-indicator.dupli-staging-status-ready i {
    color: #00a32a;
}

#dupli-staging-success-bar {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-bottom: 1px solid #28a745;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#dupli-staging-success-bar .dupli-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #28a745;
    border-radius: 50%;
    flex-shrink: 0;
}

#dupli-staging-success-bar .dupli-success-icon i {
    color: #fff;
    font-size: 14px;
}

#dupli-staging-success-bar .dupli-success-message {
    color: #155724;
    font-weight: 600;
    font-size: 13px;
}

#dupli-staging-success-bar .dupli-success-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

#dupli-staging-success-bar .button {
    margin: 0;
}

/* Staging Complete Content */
#dupli-staging-complete-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.dupli-staging-complete-box {
    text-align: center;
    max-width: 500px;
}

.dupli-staging-complete-box > i {
    font-size: 96px !important;
    color: #00a32a;
    margin-bottom: 24px;
}

.dupli-staging-complete-box h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 10px;
}

.dupli-staging-complete-box p {
    font-size: 14px;
    color: #646970;
    margin: 0 0 30px;
}

.dupli-staging-complete-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.dupli-staging-complete-actions .button-hero {
    padding: 12px 24px;
    height: auto;
    font-size: 14px;
}

.dupli-staging-complete-actions .button i {
    margin-right: 6px;
}

#dupli-staging-installer-wrapper {
    position: fixed !important;
    top: 32px !important; /* WordPress admin bar height */
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: #f0f0f1;
    z-index: 99999;
    display: flex;
    flex-direction: column;
}

#dupli-staging-installer-top-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    flex-shrink: 0;
}

.dupli-staging-installer-title {
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
}

.dupli-staging-installer-title i {
    margin-right: 5px;
    color: #2271b1;
}

#dupli-staging-installer-iframe {
    width: 100%;
    flex: 1;
    border: none;
    display: block;
}

/* Create Staging Modal */
.dup-box.dupli-staging-create-modal {
    width: 550px;
    background: #fff;
}

.dup-box.dupli-staging-create-modal .dup-box-title.no-toggle {
    cursor: default;
}

.dup-box.dupli-staging-create-modal .dup-box-title.no-toggle:hover {
    background-color: transparent;
}

.dupli-staging-modal-select {
    min-width: 350px;
}

.dupli-staging-create-modal select,
.dupli-staging-create-modal input[type="text"] {
    margin-bottom: 0;
}

.dupli-staging-validation-result {
    margin-bottom: 15px;
}

.dupli-staging-validation-result .notice {
    margin: 0;
    padding: 10px 12px;
}

.dupli-staging-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

/* Staging Page - Notices and Messages */
.notice.dupli-staging-incompatible-notice {
    margin: 20px 0;
    padding: 15px 20px 15px 20px;
}

.dupli-staging-incompatible-notice h3 {
    margin: 0 0 8px;
}

.dupli-staging-incompatible-notice p {
    margin: 0;
}

/* Staging Page - Table Footer */
.dupli-staging-table-footer {
    text-align: right;
    font-size: 12px;
}

/* Staging Page - Action Buttons */
.dupli-open-admin-column .full-cell-button,
.dupli-delete-column .full-cell-button {
    box-shadow: none;
}

/* Staging Page - Delete Confirmation Dialog */
.dupli-staging-delete-items {
    margin-top: 15px;
}

.dupli-staging-delete-item {
    padding: 5px 0;
}

.dupli-staging-delete-warning {
    margin-top: 15px;
}

/* Staging Page - Validation Issues List */
.dupli-staging-issues-list {
    margin: 5px 0 0 20px;
}

/* Staging Page - Checkbox Column */
.dupli-check-column-narrow {
    width: 10px;
}

/* Hidden Modal Content */
.dupli-modal-content-hidden {
    display: none;
}

/* Responsive */
@media screen and (max-width: 782px) {
    #dupli-staging-installer-wrapper {
        top: 46px; /* Mobile admin bar height */
    }

    .dup-box.dupli-staging-create-modal {
        width: auto;
        min-width: 300px;
    }

    .dupli-staging-modal-select {
        min-width: auto;
        width: 100%;
    }
}
