.fv-plugins-message-container.invalid-feedback {
    color: red;
    margin-top: 5px;
}

/* Error Flash Tooltip Styles - Auto-showing like flash message */
.error-flash-tooltip {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 350px;
    max-width: 500px;
    background-color: #fff;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: slideInError 0.5s ease-out forwards;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.error-flash-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.error-flash-tooltip.hide {
    opacity: 0;
    visibility: hidden;
    transform: translateX(400px);
    transition: all 0.3s ease-in;
}

.error-flash-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background-color: #fff;
}

.error-flash-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-flash-content {
    flex: 1;
    min-width: 0;
}

.error-flash-content strong {
    display: block;
    color: #dc3545;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.error-flash-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.error-flash-list li {
    padding: 6px 0;
    color: #333;
    font-size: 13px;
    line-height: 1.5;
    position: relative;
    padding-left: 16px;
}

.error-flash-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #dc3545;
    font-weight: bold;
    font-size: 16px;
}

.error-flash-list::-webkit-scrollbar {
    width: 5px;
}

.error-flash-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.error-flash-list::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 3px;
}

.error-flash-list::-webkit-scrollbar-thumb:hover {
    background: #c82333;
}

.error-flash-close,
.success-flash-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    margin-top: 0;
    font-weight: 300;
    opacity: 0.7;
}

.error-flash-close:hover {
    background-color: #fee;
    color: #dc3545;
    opacity: 1;
    transform: scale(1.1);
}

.success-flash-close:hover {
    background-color: #efe;
    color: #28a745;
    opacity: 1;
    transform: scale(1.1);
}

/* Success Flash Tooltip Styles */
.success-flash-tooltip {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 350px;
    max-width: 500px;
    background-color: #fff;
    border-left: 4px solid #28a745;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: slideInSuccess 0.5s ease-out forwards;
}

@keyframes slideInSuccess {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.success-flash-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.success-flash-tooltip.hide {
    opacity: 0;
    visibility: hidden;
    transform: translateX(400px);
    transition: all 0.3s ease-in;
}

.success-flash-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-flash-content strong {
    display: block;
    color: #28a745;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.success-flash-content p {
    color: #333;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Form Section Styles */
.form-section {
    padding-bottom: 24px; 
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #212b36);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(145, 158, 171, 0.1);
}

.form-helper-text {
    display: block;
    margin-top: 12px;
    padding: 10px 14px;
    background-color: #f8f9fa;
    border-left: 3px solid var(--btn-primary, #1976d2);
    border-radius: 4px;
    font-size: 13px;
    color: #637381;
    line-height: 1.6;
}
.setting-tag-link{
    vertical-align: middle; display: inline-flex; align-items: center;
    position: absolute; 
    margin-top: 10px;
}
.form-helper-text strong {
    color: var(--text-primary, #212b36);
    font-weight: 600;
}

/* Button Group Styles */
.btn-group {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(145, 158, 171, 0.2);
}

/* Toggle Switch Styles */
.hide-section {
    display: none;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s ease;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--btn-primary, #1976d2);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-switch:hover input:not(:disabled) + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .error-flash-tooltip {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }

    @keyframes slideInError {
        from {
            opacity: 0;
            transform: translateY(-100px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .error-flash-tooltip.hide {
        transform: translateY(-100px);
    }

    .success-flash-tooltip {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }

    .success-flash-tooltip.hide {
        transform: translateY(-100px);
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        max-width: 100%;
        width: 100%;
    }

    .form-section-title {
        font-size: 15px;
    }

    .form-helper-text {
        font-size: 12px;
        padding: 8px 12px;
    }
}