/* Global Frontend Post Pro Styles
   Namespace: gfp- */

/* Container */
.gfp-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Card Component */
.gfp-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 20px;
}

.gfp-card-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gfp-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

/* Form Styles */
.gfp-form {
    padding: 20px;
}

.gfp-form-group {
    margin-bottom: 20px;
}

.gfp-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.gfp-required {
    color: #e53e3e;
    margin-left: 4px;
}

.gfp-input,
.gfp-textarea,
.gfp-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.gfp-input:focus,
.gfp-textarea:focus,
.gfp-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gfp-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Button Styles */
.gfp-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.gfp-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.gfp-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.gfp-button-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.gfp-button-secondary:hover {
    background: #e5e7eb;
}

.gfp-button-danger {
    background: #ef4444;
    color: white;
}

.gfp-button-danger:hover {
    background: #dc2626;
}

/* Image Upload */
.gfp-image-upload,
.gfp-gallery-upload {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f9fafb;
}

.gfp-image-preview,
.gfp-gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 100px;
}

.gfp-image-preview img,
.gfp-gallery-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #e5e7eb;
}

/* Points Badge */
.gfp-points-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Word Count Info */
.gfp-word-count-info {
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
    text-align: right;
}

/* Honeypot - Hidden from real users */
.gfp-honeypot {
    display: none;
}

/* Loading State */
.gfp-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    color: #6b7280;
}

.gfp-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: gfp-spin 1s linear infinite;
}

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

/* Response Messages */
.gfp-response {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 500;
}

.gfp-response.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.gfp-response.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Dashboard Styles */
.gfp-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 0 20px;
}

.gfp-tab {
    padding: 12px 20px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease-in-out;
}

.gfp-tab:hover {
    color: #374151;
}

.gfp-tab-active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Table Styles */
.gfp-table {
    width: 100%;
    border-collapse: collapse;
}

.gfp-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.gfp-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.gfp-table tr:hover {
    background: #f9fafb;
}

/* Status Badges */
.gfp-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    text-transform: capitalize;
}

.gfp-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.gfp-badge-warning {
    background: #fed7aa;
    color: #92400e;
}

.gfp-badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.gfp-badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.gfp-badge-default {
    background: #e5e7eb;
    color: #374151;
}

/* Action Buttons */
.gfp-actions {
    display: flex;
    gap: 8px;
}

.gfp-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.15s ease-in-out;
}

.gfp-action-btn:hover {
    background: #f3f4f6;
}

.gfp-edit-btn {
    color: #667eea;
}

.gfp-delete-btn {
    color: #ef4444;
}

/* Pagination */
.gfp-pagination {
    padding: 20px;
    text-align: center;
}

.gfp-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    text-decoration: none;
    color: #374151;
}

.gfp-pagination .page-numbers.current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Modal */
.gfp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gfp-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
}

.gfp-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Points Display */
.gfp-points-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* No Posts Message */
.gfp-no-posts {
    padding: 40px;
    text-align: center;
    color: #6b7280;
}

.gfp-no-posts a {
    color: #667eea;
    text-decoration: none;
}

.gfp-no-posts a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gfp-card-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .gfp-tabs {
        flex-wrap: wrap;
    }

    .gfp-tab {
        flex: 1 1 auto;
        text-align: center;
        padding: 10px;
    }

    .gfp-table {
        display: block;
        overflow-x: auto;
    }

    .gfp-actions {
        flex-direction: column;
    }
}

/* Animation */
@keyframes gfp-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gfp-card {
    animation: gfp-fade-in 0.3s ease-out;
}