/**
 * HiveMind Event Rocket Poster - Admin Styles
 */

/* Main container */
#herp-event-rocket-poster {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.herp-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.herp-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.herp-header p {
    margin: 0;
    color: #6b7280;
    font-size: 16px;
}

/* Form container */
.herp-form-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
}

/* Form groups */
.herp-form-group {
    margin-bottom: 24px;
}

.herp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.herp-form-group small {
    display: block;
    margin-top: 6px;
    color: #9ca3af;
    font-size: 12px;
}

/* Select inputs */
.herp-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.herp-form-group select:focus {
    outline: none;
    border-color: #6366f1;
}

/* Textarea */
.herp-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease;
}

.herp-form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
}

/* Date/time inputs */
.herp-form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.herp-form-group input[type="text"]:focus {
    outline: none;
    border-color: #6366f1;
}

/* Schedule row */
.herp-schedule-row {
    display: flex;
    gap: 20px;
}

.herp-schedule-date,
.herp-schedule-time {
    flex: 1;
}

/* Action buttons group */
.herp-action-group .herp-action-buttons {
    display: flex;
    gap: 20px;
}

.herp-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.herp-radio-label:hover {
    border-color: #6366f1;
}

.herp-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

.herp-radio-label input[type="radio"]:checked + span {
    color: #6366f1;
    font-weight: 600;
}

/* Submit group */
.herp-submit-group {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.herp-submit-group button {
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#herp-submit-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#herp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

#herp-submit-btn:disabled {
    background: #9ca3af;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

#herp-preview-btn {
    background: #fff;
    color: #374151;
    border: 2px solid #e5e7eb;
}

#herp-preview-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* Event preview */
.herp-event-preview {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.herp-preview-loading {
    text-align: center;
    color: #6b7280;
    padding: 20px;
}

.herp-event-details {
    display: flex;
    gap: 20px;
}

.herp-event-image {
    flex-shrink: 0;
}

.herp-event-image img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.herp-event-info h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #1f2937;
}

.herp-event-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #4b5563;
}

.herp-event-description {
    margin-top: 12px !important;
    color: #6b7280 !important;
    font-style: italic;
}

/* Modal */
.herp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.herp-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.herp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.herp-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1f2937;
}

.herp-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.herp-modal-close:hover {
    color: #374151;
}

.herp-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.herp-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    text-align: right;
}

/* Loading spinner */
.herp-spinner-holder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
}

.herp-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: herp-spin 1s linear infinite;
}

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

/* Scheduled posts table */
.herp-scheduled-posts {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
}

#herp-scheduled-table-container {
    position: relative;
    transition: opacity 0.3s ease;
}

.herp-scheduled-posts h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1f2937;
}

.herp-scheduled-table {
    width: 100%;
    border-collapse: collapse;
}

.herp-scheduled-table th,
.herp-scheduled-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.herp-scheduled-table th {
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.herp-scheduled-table td {
    color: #4b5563;
    font-size: 14px;
}

.herp-scheduled-table tbody tr:hover {
    background: #f9fafb;
}

.herp-no-posts {
    text-align: center;
    color: #9ca3af;
    padding: 40px !important;
}

/* Status badges */
.herp-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.herp-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.herp-status-published {
    background: #d1fae5;
    color: #065f46;
}

.herp-status-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Delete link */
.herp-delete-post {
    color: #ef4444;
    text-decoration: none;
    font-size: 13px;
}

.herp-delete-post:hover {
    text-decoration: underline;
}

/* Chosen select overrides */
.chosen-container {
    width: 100% !important;
}

.chosen-container-single .chosen-single {
    height: 46px;
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.chosen-container-active.chosen-with-drop .chosen-single {
    border-color: #6366f1;
}

.chosen-container .chosen-drop {
    border: 2px solid #6366f1;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chosen-container-multi .chosen-choices {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.chosen-container-active .chosen-choices {
    border-color: #6366f1;
}

/* jQuery UI datepicker overrides */
.ui-datepicker {
    z-index: 9999999 !important;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    #herp-event-rocket-poster {
        padding: 15px;
    }
    
    .herp-form-container {
        padding: 20px;
    }
    
    .herp-schedule-row {
        flex-direction: column;
    }
    
    .herp-action-group .herp-action-buttons {
        flex-direction: column;
    }
    
    .herp-submit-group {
        flex-direction: column;
    }
    
    .herp-submit-group button {
        width: 100%;
    }
    
    .herp-event-details {
        flex-direction: column;
    }
    
    .herp-event-image img {
        width: 100%;
        height: 150px;
    }
    
    .herp-modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

/* Table filters */
.herp-table-filters {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.herp-filter-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.herp-filter-row:last-child {
    margin-bottom: 0;
}

.herp-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.herp-filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    white-space: nowrap;
}

.herp-filter-group input[type="text"],
.herp-filter-group input[type="date"] {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.2s ease;
}

.herp-filter-group input[type="text"]:focus,
.herp-filter-group input[type="date"]:focus {
    outline: none;
    border-color: #6366f1;
}

.herp-filter-group input[type="text"] {
    min-width: 250px;
}

.herp-filter-group input[type="date"] {
    min-width: 150px;
}

.herp-quick-filter {
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #374151;
}

.herp-quick-filter:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f0f1ff;
}

#herp-apply-filters,
#herp-clear-filters {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#herp-apply-filters {
    background: #6366f1;
    color: #fff;
    border: none;
}

#herp-apply-filters:hover {
    background: #5558e3;
}

#herp-clear-filters {
    background: #fff;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

#herp-clear-filters:hover {
    border-color: #9ca3af;
    color: #374151;
}

/* Pagination */
.herp-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.herp-pagination-info {
    color: #6b7280;
    font-size: 14px;
}

.herp-pagination-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.herp-page-link {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.herp-page-link:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f0f1ff;
}

.herp-page-link.herp-current-page {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    pointer-events: none;
}

.herp-pagination-ellipsis {
    padding: 0 4px;
    color: #9ca3af;
    font-size: 13px;
}

/* Responsive filters */
@media (max-width: 768px) {
    .herp-filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .herp-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .herp-filter-group input[type="text"],
    .herp-filter-group input[type="date"] {
        width: 100%;
        min-width: 0;
    }
    
    .herp-pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .herp-pagination-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
