/* Shared CSS Styles for Port Ledger Application */

/* Form background gradient */
.form-form-color {
    background: linear-gradient(135deg, #d4dadf 0%, #d4dadf 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

/* Card styling to complement form background */
.modal-form-color {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.modal-form-color .card {
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Shared modal styling */
.modal-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 12px 12px 0 0;
    border: 1px solid #e2e8f0;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.modal-body {
    border-top: none;
    border-bottom: none;
    padding: 1.5rem;
    border-radius: 0;
}

.modal-footer {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 0 0 12px 12px;
    border: 1px solid #e2e8f0;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Draggable modal header styling */
.modal-header.draggable {
    cursor: move;
    user-select: none;
}

.modal-header.draggable:hover {
    background-color: #f8f9fa;
}

/* Form spacing in modals */
.modal-body .mb-3 {
    margin-bottom: 1.5rem !important;
}

.modal-body .mb-3:last-child {
    margin-bottom: 0 !important;
}

.modal-body .row .mb-3 {
    margin-bottom: 1.5rem !important;
}

.modal-body .row .mb-3:last-child {
    margin-bottom: 0 !important;
}

/* Shared form styling for modals */
.modal-form .form-label {
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
}

.modal-form .form-control,
.modal-form .form-select {
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0.15rem 0.35rem;
    font-size: 0.8rem;
}

.modal-form .form-control:focus,
.modal-form .form-select:focus {
    border-color: #314f6f;
    box-shadow: 0 0 0 0.2rem rgba(49, 79, 111, 0.25);
}

/* Shared button styling for modals */
.modal-form .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modal-form .btn-primary {
    background: linear-gradient(135deg, #314f6f 0%, #416892 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

.modal-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(49, 79, 111, 0.4);
}

.modal-form .btn-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

.modal-form .btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.4);
}

/* Shared validation styling */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* Page title styling with icons - Higher specificity to override navigation.js */
h2.page-title {
    color: #314f6f !important;
    font-weight: 600 !important;
    font-size: 1.2rem !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
}

h2.page-title i {
    color: #416892 !important;
    font-size: 1.3rem !important;
    margin-right: 0.5rem !important;
    background: linear-gradient(135deg, #416892 0%, #314f6f 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

h2.page-title span {
    background: linear-gradient(135deg, #314f6f 0%, #416892 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Table header styling with primary color */
.table thead th {
    background: #314f6f !important;
    color: white !important;
    font-weight: 600 !important;
    border: none !important;
    padding: 0.15rem 0.3rem !important;
    font-size: 0.6rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1px !important;
}

.table thead th:first-child {
    border-top-left-radius: 8px !important;
}

.table thead th:last-child {
    border-top-right-radius: 8px !important;
}
