/*  GAP3 Coders Taxonomy Post Order Admin Styles */

.gap3coderstpo-reorder-section {
    margin-top: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
}

.gap3coderstpo-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.gap3coderstpo-post-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: move;
}

.gap3coderstpo-post-item:hover {
    background: #f0f0f1;
    border-color: #0073aa;
}

.gap3coderstpo-post-item.gap3coderstpo-dragging {
    opacity: 0.8;
    transform: rotate(2deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.gap3coderstpo-post-item:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.gap3coderstpo-post-handle {
    margin-right: 15px;
    color: #666;
    cursor: grab;
    padding: 5px;
}

.gap3coderstpo-post-handle:active {
    cursor: grabbing;
}

.gap3coderstpo-post-handle .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.gap3coderstpo-post-content {
    flex: 1;
    min-width: 0;
}

.gap3coderstpo-post-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    word-wrap: break-word;
}

.gap3coderstpo-post-meta {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
}

.gap3coderstpo-post-excerpt {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.gap3coderstpo-post-actions {
    margin-left: 15px;
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.gap3coderstpo-post-actions .button {
    font-size: 12px;
    padding: 4px 8px;
    height: auto;
    line-height: 1.4;
}

.gap3coderstpo-post-placeholder {
    background: #e1f5fe;
    border: 2px dashed #0073aa;
    border-radius: 4px;
    margin-bottom: 10px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0073aa;
    font-weight: 600;
}

.gap3coderstpo-post-placeholder:before {
    content: "Drop here";
}

.gap3coderstpo-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

#gap3coderstpo-loading {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 10px 0;
    color: #856404;
}

#gap3coderstpo-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 10px 0;
    color: #155724;
}

/* Responsive design */
@media (max-width: 782px) {
    .gap3coderstpo-post-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gap3coderstpo-post-handle {
        margin-right: 0;
        margin-bottom: 10px;
        align-self: center;
    }
    
    .gap3coderstpo-post-actions {
        margin-left: 0;
        margin-top: 10px;
        align-self: stretch;
    }
    
    .gap3coderstpo-actions {
        flex-direction: column;
    }
    
    .gap3coderstpo-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Form table improvements */
.form-table th {
    width: 150px;
}

.form-table select {
    min-width: 200px;
}

/* Loading animation */
#gap3coderstpo-loading p:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid #856404;
    border-top-color: transparent;
    border-radius: 50%;
    animation: gap3coderstpo-spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes gap3coderstpo-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility improvements */
.gap3coderstpo-post-item[tabindex]:focus {
    box-shadow: 0 0 0 2px #0073aa;
}

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Notice styling */
.notice {
    margin: 20px 0;
}