/* ============================================
   DialogInsight Form - Base Functional Styles
   ============================================ */

/* Form container */
.DialogInsightFormDiv {
    padding: 5px;
    position: relative;
    margin-top: 5px;
}

/* Row spacing */
.DialogInsightFormRow {
    display: block;
    margin-bottom: 10px;
    clear: both;
}

/* Labels */
.DialogInsightLabel_AboveField {
    display: block;
    margin-bottom: 5px;
}

.DialogInsightLabel_LeftOfField {
    display: inline-block;
    vertical-align: top;
    padding-top: 5px;
}

/* Input container */
.DialogInsightInputContainer {
    display: inline-block;
    width: 300px;
    position: relative;
}

/* Text inputs */
.DialogInsightFormInput {
    font-size: 13px;
    padding: 4px;
    box-sizing: border-box;
}

/* Submit button area */
.DialogInsightFormSubmit {
    margin-top: 10px;
}

.DialogInsightFormSubmit button {
    cursor: pointer;
    padding: 6px 15px;
}

/* Loading indicator */
.DialogInsightFormSubmitLoader {
    display: none;
    vertical-align: middle;
    margin-left: 5px;
}

/* Placeholder simulation */
.DialogInsightInputWithPlaceholderContainer {
    position: relative;
    display: inline-block;
    width: 100%;
}

.DialogInsightInputPlaceholderText,
.DialogInsightInputPlaceholder {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    font-size: 13px;
}

/* Date picker icon */
.DialogInsightFormInputDatePickerIcon {
    cursor: pointer;
    vertical-align: middle;
    margin-left: 5px;
}

/* ============================================
   Date Picker Popup
   ============================================ */

.DialogInsightDatePicker {
    position: absolute;
    z-index: 6000;
    background: white;
    border: 1px solid #ccc;
    padding: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15);
}

.DialogInsightDatePickerTitle {
    text-align: center;
    font-weight: bold;
    margin-bottom: 5px;
}

.DialogInsightDatePickerNav {
    cursor: pointer;
    padding: 2px 6px;
}

.DialogInsightDatePickerDayHeader {
    font-weight: bold;
    text-align: center;
    padding: 2px 4px;
}

.DialogInsightDatePickerDay {
    text-align: center;
    padding: 2px 4px;
    cursor: pointer;
}

.DialogInsightDatePickerDay:hover {
    background-color: #eee;
}

.DialogInsightDatePickerDaySelected {
    background-color: #369;
    color: white;
}

.DialogInsightDatePickerDayOtherMonth {
    color: #ccc;
}

/* ============================================
   Error States
   ============================================ */

.DialogInsightErrorContainer {
    color: #f00;
    font-size: 11px;
    margin-top: 3px;
}

.DialogInsightErrorContents {
    color: #f00;
}

.DialogInsightGlobalErrors {
    color: #f00;
    margin-bottom: 10px;
}

/* ============================================
   Loading State
   ============================================ */

.DialogInsightFormLoading {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.DialogInsightFormLoading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: di-spin 0.8s linear infinite;
}

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

/* ============================================
   LightBox (modal forms)
   ============================================ */

.DialogInsightLightBox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 5999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.DialogInsightLightBoxContent {
    background-color: white;
    padding: 20px;
    max-width: 500px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.DialogInsightLightBoxCloseButton {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    line-height: 30px;
    text-align: center;
}

.DialogInsightLightBoxCloseButton::before,
.DialogInsightLightBoxCloseButton::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #999;
    left: 5px;
    top: 14px;
}

.DialogInsightLightBoxCloseButton::before {
    transform: rotate(45deg);
}

.DialogInsightLightBoxCloseButton::after {
    transform: rotate(-45deg);
}

/* Confirmation / success message */
.DialogInsightFormConfirmation {
    padding: 15px;
    text-align: center;
}
