/**
 * CSS for Relationship - RT5 compatible
 * @since 2024
 * Updated for RT5 Bootstrap-based UI
 */

/* Form fields styling */
.RELFields {
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.RELFields:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Error border for validation */
.RELErrorBorder {
    border: 1px solid #dc3545 !important;
}

/* Remove/modify trigger styling */
.RELRemoveTrigger {
    color: #007bff;
    cursor: pointer;
}

.RELRemoveTrigger:hover {
    color: #dc3545;
    text-decoration: underline;
}

/* Contact list table */
#RELList {
    width: 100%;
    margin-top: 0.5rem;
}

#RELList tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Add to mail/partner links */
.RELaddTo {
    color: #007bff;
    font-size: 0.85rem;
}

.RELaddTo:hover {
    cursor: pointer;
    text-decoration: underline;
    color: #0056b3;
}

/* Birthday and Nameday fields */
#RELBrithday,
#RELNameday {
    width: 120px;
}

/* Text info (error messages) */
#textInfo {
    float: right;
    color: #dc3545;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Partner contact list dropdown */
#PartnerContactList {
    min-width: 200px;
}

#PartnerContactOK {
    float: right;
    margin-top: 0.5rem;
}

/* Container styling */
#RELContainer {
    padding: 0.5rem;
}

#RELRelationshipBox {
    width: 100%;
}

#RELRelationshipBox td {
    padding: 0.25rem;
}

/* Contact entry styling */
#RELContactList {
    border: none;
    padding: 0.5rem 0;
}

/* On Update page - side by side layout */
.RELonUpdate {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

/* Responsive form layout for contact entry */
.rel-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
    align-items: center;
}

.rel-form-row label {
    flex: 0 0 40%;
    text-align: right;
    padding-right: 0.5rem;
    font-size: 0.875rem;
}

.rel-form-row input,
.rel-form-row select,
.rel-form-row textarea {
    flex: 0 0 55%;
}

/* Add button styling */
#RELAdd {
    margin-top: 0.5rem;
}

/* Collection table styling for partner contacts */
.collection-as-table {
    padding: 0.5rem;
}

/* Fix for textarea in form */
#RELHobby {
    resize: vertical;
    min-height: 60px;
}
