/*
 * Legal Compliance Styles for Polish Real Estate Price Transparency Law
 * Journal of Laws 2024 item 834
 */

/* Legal field styling in tooltips */
.tooltipCard__item.legal-field {
    border-top: 1px solid #e0e0e0;
    padding-top: 8px;
    margin-top: 8px;
}

.tooltipCard__item.legal-field:first-of-type {
    border-top: 2px solid #0073aa;
    margin-top: 12px;
    padding-top: 12px;
}

.tooltipCard__item.legal-field .tooltipCard__label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.tooltipCard__item.legal-field .tooltipCard__value {
    font-size: 13px;
    color: #333;
}

/* Legal compliance notice */
.tooltipCard__legal-notice {
    background: #f8f9fa;
    border-left: 3px solid #0073aa;
    padding: 8px 10px;
    margin: 12px 0 8px 0;
    border-radius: 3px;
}

.tooltipCard__legal-notice small {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}

/* Admin compliance status styling */
.wp-admin .column-compliance_status {
    width: 120px;
    text-align: center;
}

.wp-admin .column-compliance_status span {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* Responsive design for mobile tooltips */
@media screen and (max-width: 768px) {
    .tooltipCard {
        max-width: 90vw;
        margin: 0 5vw;
    }
    
    .tooltipCard__item {
        padding: 8px 0;
    }
    
    .tooltipCard__item.legal-field {
        padding: 10px 0;
    }
    
    .tooltipCard__label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .tooltipCard__value {
        font-size: 14px;
        font-weight: 600;
    }
    
    .tooltipCard__legal-notice {
        margin: 8px 0;
        padding: 6px 8px;
    }
    
    .tooltipCard__legal-notice small {
        font-size: 10px;
        line-height: 1.3;
    }
}

/* Enhanced pricing display */
.tooltipCard__item.cena .tooltipCard__value,
.tooltipCard__item.cena_za_m2 .tooltipCard__value {
    font-weight: 700;
    color: #d63384;
    font-size: 16px;
}

.tooltipCard__item.metraz .tooltipCard__value {
    font-weight: 600;
    color: #198754;
}

/* VAT and legal status highlighting */
.tooltipCard__item.vat .tooltipCard__value,
.tooltipCard__item.legal_status .tooltipCard__value {
    font-weight: 500;
    color: #495057;
}

/* Date fields styling */
.tooltipCard__item.price_publication_date .tooltipCard__value,
.tooltipCard__item.offer_validity .tooltipCard__value {
    font-size: 12px;
    color: #6c757d;
}

/* Status-based styling */
.tooltipCard__item.status .tooltipCard__value[data-status="available"] {
    color: #198754;
    font-weight: 600;
}

.tooltipCard__item.status .tooltipCard__value[data-status="reserved"] {
    color: #fd7e14;
    font-weight: 600;
}

.tooltipCard__item.status .tooltipCard__value[data-status="sold"] {
    color: #dc3545;
    font-weight: 600;
}

.tooltipCard__item.status .tooltipCard__value[data-status="withdrawn"] {
    color: #6c757d;
    font-weight: 600;
}

/* Admin validation error styling */
.cbrem-validation-error {
    background: #fff2f2;
    border-left: 4px solid #dc3545;
    padding: 12px;
    margin: 15px 0;
    border-radius: 3px;
}

.cbrem-validation-error h4 {
    color: #dc3545;
    margin: 0 0 8px 0;
    font-size: 14px;
}

.cbrem-validation-error ul {
    margin: 0;
    padding-left: 18px;
}

.cbrem-validation-error li {
    margin: 4px 0;
    font-size: 13px;
    color: #721c24;
}

/* Compliance info box */
.cbrem-compliance-info {
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    padding: 12px 15px;
    margin: 20px 0;
    border-radius: 3px;
}

.cbrem-compliance-info strong {
    color: #0073aa;
}

/* Price history styling in admin */
.acf-group-price_history {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
}

.acf-group-price_history h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

/* Print styles for legal compliance */
@media print {
    .tooltipCard__legal-notice {
        background: none !important;
        border: 1px solid #000 !important;
        border-left: 3px solid #000 !important;
    }
    
    .tooltipCard__item.legal-field {
        border-color: #000 !important;
    }
    
    .tooltipCard__legal-notice small {
        color: #000 !important;
        font-weight: 600 !important;
    }
}

/* Accessibility improvements */
.tooltipCard__item[role="definition"] {
    position: relative;
}

.tooltipCard__label[aria-describedby] {
    cursor: help;
}

/* Focus states for keyboard navigation */
.tooltipCard__item:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tooltipCard__legal-notice {
        background: #ffffff;
        border-color: #000000;
    }
    
    .tooltipCard__item.legal-field {
        border-color: #000000;
    }
    
    .tooltipCard__legal-notice small {
        color: #000000;
    }
}