#prompt-manager {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 20px;
    color: #333;
}

.pm-top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pm-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.pm-search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-grow: 1;
}




#pm-search, #pm-category-filter, #pm-sort-by, #pm-per-page {
    padding: 10px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#pm-search:focus, #pm-category-filter:focus, #pm-sort-by:focus, #pm-per-page:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.2);
}

#pm-search {
    flex-grow: 1;
    margin-right: 10px;
}

#pm-category-filter, #pm-sort-by, #pm-per-page {
    width: auto;
    margin-right: 10px;
}

.pm-button {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    font-size: 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.pm-button:hover {
    background-color: #0056b3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pm-icon-button {
    background-color: #f8f9fa;
    color: #808080;
    border: none;
    padding: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 2px;
}

.pm-icon-button:hover {
    background-color: #e5e5e5;
}

.pm-icon-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    position: relative;
    z-index: 1;
}

.pm-edit-prompt {
    background-color: #f0f7fd;
}

.pm-delete-prompt {
    background-color: #fef0f0;
}

.pm-copy-prompt {
    background-color: #f0fdf0;
}

.pm-edit-prompt .dashicons {
    color: #007bff;
}

.pm-delete-prompt .dashicons {
    color: #e74c3c;
}

.pm-copy-prompt .dashicons {
    color: #007bff;
}

.pm-edit-prompt:hover {
    background-color: #e0f0ff;
}

.pm-delete-prompt:hover {
    background-color: #ffe0e0;
}

.pm-copy-prompt:hover {
    background-color: #e0ffe0;
}

/* Remove old button styles */
button.pm-edit-prompt, button.pm-delete-prompt {
    background-color: inherit;
    color: inherit;
    border: none;
    padding: 0;
    margin: 0;
    transition: none;
    font-size: inherit;
}

/* Copy Success Animation */
.pm-copy-success .dashicons {
    animation: copy-success-animation 1s;
}

@keyframes copy-success-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #007bff; }
    100% { transform: scale(1); }
}

.pm-left-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#pm-message-container {
    flex-shrink: 0;
    width: 400px;
    text-align: center;    
}

.pm-message {
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#pm-success-message {
    background-color: #dff0d8;
    color: #3c763d;
}

#pm-error-message {
    background-color: #f2dede;
    color: #a94442;
}

/* Table Styles */
.pm-table-container {
    margin-top: 20px;
    overflow-x: auto;
    border-radius: 4px;
    border: 1px solid #eee;
}

.pm-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pm-table thead {
    background-color: #f8f9fa;
}

.pm-table th {
    text-align: left;
    padding: 12px;
    font-weight: 600;
    border-bottom: 2px solid #e5e5e5;
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
}

.pm-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #e5e5e5;
}

.pm-table tbody tr:hover {
    background-color: #f9f9f9;
}

.pm-table td {
    padding: 12px;
    vertical-align: middle;
}

.pm-col-favorite {
    width: 40px;
    text-align: center;
}

.pm-col-name {
    width: 18%;
}

.pm-col-category {
    width: 12%;
}

.pm-col-prompt {
    width: 35%;
}

.pm-col-tags {
    width: 15%;
}

.pm-col-actions {
    width: 110px;
    text-align: right;
    white-space: nowrap;
}

.pm-prompt-name {
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    display: block;
}

.pm-prompt-name:hover {
    color: #007bff;
    text-decoration: underline;
}

.pm-category-label {
    background-color: #f1f1f1;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.pm-category-label:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pm-tags-container {
    font-size: 12px;
    color: #808080;
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: flex-start;
}

.pm-tag-clickable {
    color: #007bff;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 10px;
    background-color: #f0f7ff;
    display: inline-block;
    margin: 1px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.pm-tag-clickable:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pm-prompt-preview {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    max-height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-family: monospace;
}

.pm-favorite-toggle {
    font-size: 20px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pm-favorite-toggle:hover {
    transform: scale(1.1);
}

.pm-favorite-toggle.pm-favorite {
    color: #FFD700;
}

/* Edit Modal Styles */
.pm-modal-container {
    padding: 0 !important;
    border-radius: 6px !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2) !important;
    border: none !important;
}

#pm-prompt-modal, #pm-view-prompt-modal {
    display: none;
}

#pm-prompt-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0;
}

.pm-form-row {
    display: flex;
    margin-bottom: 12px;
}

.pm-form-row label {
    width: 100px;
    flex-shrink: 0;
    font-weight: 600;
    color: #333;
    font-size: 15px;
    line-height: 36px;
}

.pm-form-row input[type="text"],
.pm-form-row select {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    height: 36px;
}

#pm-prompt-content {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: monospace;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

/* Disabled form fields styling */
.pm-form-row input[type="text"]:disabled,
.pm-form-row select:disabled,
#pm-prompt-content:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: not-allowed;
}

#pm-prompt-content:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
    resize: none;
}

/* Public prompt notification */
.pm-public-prompt-notice {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pm-public-prompt-notice .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #17a2b8;
}

/* View Modal Styles */
.pm-view-prompt-container {
    padding: 0;
}

.pm-view-prompt-header {
    margin-bottom: 20px;
}

.pm-view-prompt-header h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #2c3e50;
}

.pm-view-prompt-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.pm-view-category {
    background-color: #f1f1f1;
    padding: 3px 10px;
    border-radius: 15px;
    font-weight: 600;
}

.pm-view-prompt-content {
    background-color: #f9f9f9;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-family: monospace;
    white-space: pre-wrap;
    overflow-x: auto;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.pm-view-prompt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Dialog UI Styles */
.ui-dialog {
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.ui-dialog .ui-dialog-titlebar {
    background: #f8f9fa;
    border: none;
    border-bottom: 1px solid #dee2e6;
    border-radius: 6px 6px 0 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    padding: 15px 20px;
    cursor: default;
    position: relative;
}

.ui-dialog .ui-dialog-content {
    padding: 20px;
}

.ui-dialog .ui-dialog-buttonpane {
    margin-top: 0;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 6px 6px;
    text-align: right;
}

.ui-dialog .ui-dialog-buttonpane button {
    margin-left: 10px;    
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pm-primary-button {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

.pm-secondary-button {
    background-color: #6c757d !important;
    color: white !important;
    border-color: #6c757d !important;
}

.pm-primary-button:hover {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pm-secondary-button:hover {
    background-color: #545b62 !important;
    border-color: #545b62 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ui-dialog-titlebar-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    color: #6c757d;
    font-size: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ui-dialog-titlebar-close:before {
    content: '×';
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

.ui-dialog-titlebar-close:hover {
    background: #dc3545;
    color: white;
}

/* Pagination Styles */
.pm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.pm-pagination button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pm-pagination button:hover {
    background-color: #0056b3;
}

.pm-pagination span {
    margin: 0 10px;
    font-size: 15px;
    font-weight: 600;
}

/* Category Modal Styles */
#pm-category-modal {
    padding: 20px;
    border-radius: 6px;
}

.pm-category-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

#pm-category-search {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

#pm-category-search:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.2);
}

.pm-category-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.pm-category-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.pm-category-table thead {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
}

.pm-category-table th,
.pm-category-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.pm-category-table th {
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.pm-category-row:hover {
    background-color: #f8f9fa;
}

.pm-category-name {
    font-weight: 500;
    color: #212529;
}

.pm-category-actions {
    white-space: nowrap;
}

.pm-button-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    margin-right: 5px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pm-button-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pm-category-edit {
    background-color: #007bff;
    color: white;
}

.pm-category-edit:hover {
    background-color: #0056b3;
}

.pm-button-danger {
    background-color: #dc3545;
    color: white;
}

.pm-button-danger:hover {
    background-color: #c82333;
}

#pm-category-pagination {
    margin-bottom: 20px;
}

#pm-category-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

#pm-category-name {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

#pm-category-name:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.2);
}

#pm-category-save {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

#pm-category-save:hover {
    background-color: #218838;
}

/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .pm-controls {
        flex-direction: column;
    }

    .pm-search-container {
        flex-direction: column;
    }

    .pm-search-container #pm-search {
        margin-bottom: 10px;
    }

    #pm-search, #pm-category-filter, #pm-sort-by, #pm-per-page {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    
    .pm-form-row {
        flex-direction: column;
    }
    
    .pm-form-row label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .pm-col-tags {
        display: none;
    }
    
    .pm-col-prompt {
        max-width: 200px;
        width: 40%;
    }
    
    .pm-modal-container {
        width: 95% !important;
        max-width: none !important;
    }
    
    .pm-table th, .pm-table td {
        padding: 8px;
    }
    
    .pm-icon-button {
        width: 28px;
        height: 28px;
    }
    
    .pm-icon-button .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }
}