/* PubView Card Styles - Using PrimeReact components */
/* Unified styling with TimeSlotView for consistency */

/* PrimeFlex utility classes with p- prefix for consistency */
.p-mb-3 {
    margin-bottom: 1rem !important;
}

.p-mt-4 {
    margin-top: 1.5rem !important;
}

.pubview-card-wrapper {
    margin-bottom: 12px;
    position: relative;
}

/* Override PrimeReact default card styles with higher specificity */
.pubview-card-wrapper .p-card.p-component {
    border: 1px solid #282D3B;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    position: relative;
    overflow: visible;
    max-width: 100%;
}

.pubview-card-wrapper .p-card.p-component:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 2px solid #2A8A34;
}

.pubview-card-wrapper .p-card.p-component .p-card-body {
    padding: 20px 24px !important;
}

/* Remove p-card-content wrapper from layout */
.pubview-card-wrapper .p-card-content {
    display: contents;
}

/* Custom card content wrapper - replaces p-card-content */
.pubview-card-wrapper .pubview-card-content {
    padding: 0.15rem 0;
}

/* Details Table Styles */
.pubview-details-container {
    align-items: flex-start;
    position: relative;
    padding-right: 140px;
}

.pubview-verified-badge {
    font-size: 14px;
    line-height: 1.3;
    font-weight: 500;
    position: absolute;
    top: 0;
    right: 0;
    white-space: nowrap;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 16px;
    background-color: rgba(2, 244, 155, 0.1);
}

.pubview-verified-badge i {
    color: #02f49b;
    font-size: 20px;
}

.pubview-verified-badge .publish-from-label {
    font-size: 13px;
    font-weight: 600;
}

/* Not verified style - red color */
.pubview-verified-badge.not-verified {
    background-color: rgba(239, 68, 68, 0.1);
}

.pubview-verified-badge.not-verified i {
    color: #ef4444;
}

.pubview-verified-badge.not-verified .publish-from-label {
    color: #ef4444;
}

/* Verified style - dark green color */
.pubview-verified-badge.verified {
    background-color: rgba(2, 244, 155, 0.1);
}

.pubview-verified-badge.verified i {
    color: #059669;
}

.pubview-verified-badge.verified .publish-from-label {
    color: #059669;
}

/* Unknown style - red color */
.pubview-verified-badge.unknown {
    background-color: rgba(239, 68, 68, 0.1);
}

.pubview-verified-badge.unknown i {
    color: #dc2626;
}

.pubview-verified-badge.unknown .publish-from-label {
    color: #dc2626;
}

.pubview-details-table {
    width: auto;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    overflow: hidden;
}

.pubview-details-table tbody tr {
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.pubview-details-table tbody tr:last-child {
    border-bottom: none;
}

.pubview-details-table td {
    padding: 8px 12px;
    font-size: 14px;
    color: #282D3B;
    border-right: 1px solid rgba(229, 231, 235, 0.5);
    line-height: 1.5;
}

.pubview-details-table td:last-child {
    border-right: none;
}

.pubview-detail-label {
    text-align: right;
    font-weight: 400;
    background: transparent;
    white-space: nowrap;
    font-size: 14px;
    color: #282D3B;
}

.pubview-detail-value {
    text-align: left;
    font-weight: 400;
    background: transparent;
    font-size: 14px;
    color: #282D3B;
    line-height: 1.5;
}

/* Title centering */
.pubview-card-wrapper .p-card-title {
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-size: 22px;
    font-weight: 400;
    color: #282D3B;
    line-height: 1.2;
}

/* Read more link */
.pubview-card-wrapper .p-text-right {
    cursor: pointer;
    transition: color 0.2s ease;
    font-size: 15px;
    color: #282D3B;
    font-weight: 400;
}

.pubview-card-wrapper .p-text-right:hover {
    text-decoration: underline;
}

/* Description container */
.pubview-card-wrapper .pubview-description-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Description text */
.pubview-card-wrapper .pubview-description-container p {
    font-size: 15px;
    color: #282D3B;
    line-height: 1.4;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
    font-weight: 400;
}

/* Details table inside description container - align left */
.pubview-card-wrapper .pubview-description-container .pubview-details-table {
    align-self: flex-start;
    margin-bottom: 10px;
}

/* Tags section inside description container - align left */
.pubview-card-wrapper .pubview-description-container .p-d-flex.p-align-items-center.p-gap-2.p-mb-3 {
    align-self: flex-start;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Subtasks section inside description container - align left and full width */
.pubview-card-wrapper .pubview-description-container .p-mb-3 {
    width: 100%;
    align-self: flex-start;
}

.pubview-card-wrapper .pubview-description-container .task_details_section_heading {
    width: 100%;
    margin-top: 16px;
    margin-bottom: 8px;
}

.pubview-card-wrapper .pubview-description-container .task_details_subtasks_container {
    width: 100%;
    padding-top: 0;
    margin-top: 0;
    max-height: 400px;
}

/* Public variant subtask items - full width */
.pubview-card-wrapper .pubview-description-container .task_details_subtasks_container > div[style*="padding: 8px 12px"] {
    width: 100%;
    box-sizing: border-box;
}

/* Read more positioning - ensure it's right-aligned */
.pubview-card-wrapper .pubview-description-container .p-text-right {
    margin-top: 10px;
    align-self: flex-end;
}

/* Tags section styling */
.pubview-card-wrapper .p-d-flex.p-align-items-center.p-gap-2.p-mb-3 {
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #6b7687;
}

.pubview-card-wrapper .p-d-flex.p-align-items-center.p-gap-2.p-mb-3 span:first-child {
    font-size: 1rem;
}

.pubview-card-wrapper .p-d-flex.p-align-items-center.p-gap-2.p-mb-3 span:last-child {
    color: #6b7687;
    font-weight: 400;
    line-height: 1.4;
}

/* Action buttons container */
.pubview-card-wrapper .flex.gap-2.flex-wrap {
    width: 100%;
    gap: 10px !important; /* Override gap-2 (0.5rem) to match design */
}

/* Action buttons styling */
.pubview-card-wrapper .p-button.p-button-outlined {
    border-color: #e5e7eb ;
    color: #6c757d ;
    background: white ;
}

.pubview-card-wrapper .p-button.p-button-outlined:hover {
    background: #f9fafb ;
    border-color: #d1d5db ;
}

.pubview-card-wrapper .p-button.p-button-secondary {
    background: #e5e7eb ;
    color: #282d3b ;
    border-color: #e5e7eb ;
}

.pubview-card-wrapper .p-button.p-button-secondary:hover {
    background: #d1d5db ;
    border-color: #d1d5db ;
}

/* Emergency message styling - for both inline and regular Message */
.pubview-card-wrapper .p-inline-message.p-inline-message-warn,
.pubview-card-wrapper .p-message.p-message-warn,
.pubview-card-wrapper .p-component.p-inline-message.p-inline-message-warn,
.pubview-card-wrapper .p-component.p-message.p-message-warn,
.pubview-card-wrapper [data-pc-name="message"].p-message.p-message-warn {
    margin-bottom: 15px ;
    padding: 12px 16px ;
    background: #fef3c7 ;
    border-radius: 8px ;
    border: none ;
    border-width: 0 ;
    border-left-width: 0 ;
}

.pubview-card-wrapper .p-inline-message.p-inline-message-warn .p-inline-message-text,
.pubview-card-wrapper .p-message.p-message-warn .p-message-text,
.pubview-card-wrapper .p-component.p-inline-message.p-inline-message-warn .p-inline-message-text,
.pubview-card-wrapper .p-component.p-message.p-message-warn .p-message-text {
    font-weight: 400 ;
    color: #f59e0b ;
    font-size: 14px ;
}

.pubview-card-wrapper .p-inline-message.p-inline-message-warn .p-inline-message-icon,
.pubview-card-wrapper .p-message.p-message-warn .p-message-icon,
.pubview-card-wrapper .p-component.p-inline-message.p-inline-message-warn .p-inline-message-icon,
.pubview-card-wrapper .p-component.p-message.p-message-warn .p-message-icon {
    color: #f59e0b ;
}

/* Responsive adjustments for pubview card */
@media (max-width: 768px) {
    .pubview-card-wrapper {
        margin: 15px 0;
    }
    
    .pubview-details-container {
        flex-direction: column;
        padding-right: 0;
    }
    
    .pubview-details-table {
        width: 100%;
        margin-bottom: 15px;
        order: 2;
    }
    
    /* Verified badge mobile styles - positioned on the right */
    .pubview-verified-badge {
        position: static;
        width: auto;
        text-align: right;
        margin-top: 0;
        margin-bottom: 12px;
        align-self: flex-end;
        order: 1;
    }
}
