/* Post Revision Display Styles */
.prd-revision-history-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    margin: 20px 0;
    transition: background-color 0.3s ease;
}

.prd-revision-history-btn:hover {
    background: #005a87;
    color: #fff;
}

/* Modal Styles */
.prd-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.prd-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.prd-modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.prd-modal-title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

.prd-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.prd-modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.prd-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    gap: 20px;
}

.prd-revisions-list {
    flex: 0 0 300px;
    border-right: 1px solid #ddd;
    padding-right: 20px;
}

.prd-revisions-list h4 {
    margin-top: 0;
    color: #333;
    font-size: 1.2em;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.prd-revision-item {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.prd-revision-item:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0,124,186,0.1);
}

.prd-revision-item.active {
    border-color: #007cba;
    background: #f8f9ff;
    box-shadow: 0 2px 8px rgba(0,124,186,0.2);
}

.prd-revision-date {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.prd-revision-author {
    color: #666;
    font-size: 0.9em;
}

.prd-revision-content {
    flex: 1;
    padding-left: 20px;
}

.prd-revision-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    min-height: 400px;
}

.prd-revision-meta {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.prd-diff-container {
    margin-top: 20px;
}

.prd-diff-toggle {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 15px;
    transition: background-color 0.3s ease;
}

.prd-diff-toggle:hover {
    background: #005a87;
}

.prd-diff-content {
    display: none;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
}

/* Diff table styles */
table.diff {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

table.diff th {
    text-align: left;
    padding: 8px;
    font-weight: bold;
}

table.diff .diff-deletedline {
    background-color: #fdd;
    width: 50%;
}

table.diff .diff-deletedline del {
    background-color: #f99;
    text-decoration: none;
}

table.diff .diff-addedline {
    background-color: #dfd;
    width: 50%;
}

table.diff .diff-addedline ins {
    background-color: #9f9;
    text-decoration: none;
}

table.diff .diff-context {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .prd-modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .prd-modal-body {
        flex-direction: column;
        gap: 15px;
    }

    .prd-revisions-list {
        flex: none;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding-right: 0;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .prd-revision-content {
        padding-left: 0;
    }
}

/* Loading spinner */
.prd-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #666;
}

.prd-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* ACF field styles */
.prd-acf-field {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007cba;
}

.prd-acf-field-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.prd-acf-field-value {
    color: #666;
    word-wrap: break-word;
}

/* Error messages */
.prd-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 15px 0;
}



